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'));
}
});
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
$(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'));
}
});
})