i have list of users on page. when user move on bottom of page, jquery load next users - this:
jquery(function() { if ($('.pagination').length) { $(window).scroll(function() { var url; url = $('.pagination .next_page').attr('href'); if (url && $(window).scrolltop() > $(document).height() - $(window).height() - 50) { $('.pagination').text("fetching more products..."); return $.getscript(url); } }); } return $(window).scroll(); }); $(document).on("ready page:change", function() { $('.tooltip').tooltipster({ animation: 'grow' }); });
for users photo use tooltip load title of img. tooltip works photo has been loaded on first page load. when go on bottom of page , load new users , havent got tooltip. should search answer problem?
in scroll function after images loaded..call tooltip function again
$(window).scroll(function() { var url; url = $('.pagination .next_page').attr('href'); if (url && $(window).scrolltop() > $(document).height() - $(window).height() - 50) { $('.pagination').text("fetching more products..."); $.getscript(url); //dont return change logic $('.tooltip').tooltipster({ animation: 'grow' }); } });
Comments
Post a Comment