if( $(window).scrollTop() + $(window).height() >= $(document).height() - controlheight && !loading && $('#loaded_stop').val() ==0 && cat.length > 0 ) { if( loading == false ){ loading = true; //$.toast(url +" cat="+$('#loaded_cat').text() + " start="+$('#loaded_start').val()+'&count='+onimod_viewcount+"loaded_stop="+$('#loaded_stop').val() ); var $imageElement = $("
"); $(id).append($imageElement); $('#loadingbar').show(); //Display down50.png as loading true. Style set in css/main.css $.get(url+'?readform&cat='+cat+'&start='+$('#loaded_start').val()+'&count='+onimod_viewcount+'&max='+onimod_viewcount) .success( function(html){ //html = $.parseHTML(data) ; //content = $(html).filter('#container'); //alert(html); $(id).append(html); //Add content to id $('#loaded_start').val(parseInt($('#loaded_start').val())+onimod_viewcount); //Increment '#loaded_max' loading = false; }) .complete( function(){ $imageElement.remove(); $('#loadingbar').hide(); //Hide down50.png after loading }) .error(function(xhr,statusText){ $.toast('do Get HTML ' +statusText+ ' '+ xhr.status); loading = false; //для дозагрузки }); }; //loading == false }; //$(window).scrollTop() }); // -->