i using code scrolling images when scrolling down multiple images displayed.
please can rectify issues, may problem if condition.
<script type="text/javascript"> $(document).ready(function(){ $(window).scroll(function(){ var windowheight = $(window).height(); //if($(window).scrolltop()+700 >= $(document).height() - windowheight) if ($(window).scrolltop() >= ($(document).height() - $(window).height())*0.7){ $("#loader").html("<img src='http://www.niharonline.com/photo/ajax-loader.gif' alt='loading'/>"); var lastdiv = $(".as_country_container:last"); var lastid = $(".as_country_container:last").attr("id"); var valuetopass = "lastid="+lastid; $.ajax({ type: "post", url: "http://www.niharonline.com/photo/getdata.php", data: valuetopass, cache: true, `enter code here` success: function(html){ if(html){ lastdiv.after(html); $('.columns-block').masonry('reload'); } } }); return false; } return false; }); }); </script>
Comments
Post a Comment