Stud Earring


Stud Earring
function ScrollExecute() { if($(document).height() < ($(document).scrollTop() + $(window).height())) { scrollNode = $('#more').last(); scrollURL = $('#more p a').last().attr("href"); if(scrollNode.length > 0 && scrollNode.css('display') != 'none') { console.log("Trigger"): $.ajax({ type: 'GET', url: scrollURL, beforeSend: function() { scrollNode.clone().empty().insertAfter(scrollNode).append(''); scrollNode.hide(); }, success: function(data) { // remove loading feedback scrollNode.next().remove(); var filteredData = $(data).find(".product"); filteredData.insertBefore( $("#product-list-foot") ); console.log(filteredData); }, dataType: "html" }); } } } $(document).ready(function () { $(window).scroll(function(){ $.doTimeout( 'scroll', 200, ScrollExecute); }); });