-
Notifications
You must be signed in to change notification settings - Fork 571
Open
Description
i'm using this plugin to know which item in my page has been seen ... something like this
$('li.not_seen').bind('inview', function (event, visible, topOrBottomOrBoth) {
if (visible == true) {
$(this).removeClass('not_seen');
console.log($(this).attr('id'));
}
});
it works great but here is the problem
i have a sort plugin which rearranges the items based on their attributes , so for example if i click on sort by date items with bigger or smaller date would come to top of the page without any scrolling ... here is the problem , now when i scroll none of the items would trigger inview and code wont work anymore
i've tried to re-run the plugin code with each sort
$(document).on('click' , '.sort' , function(){
$('li.not_seen').bind('inview', function (event, visible, topOrBottomOrBoth) {
if (visible == true) {
$(this).removeClass('not_seen');
console.log($(this).attr('id'));
}
});
})
but it wont work , any suggestion ?
Metadata
Metadata
Assignees
Labels
No labels