<script>
$(function(){
var i = 0 ;
$(window).scroll(function(){
// 当滚动到最底部以上50像素时, 加载新内容
if ($(document).height() - $(this).scrollTop() - $(this).height()<270){
var myDate = new Date();
row = $('.rooms_show_ul').children('li').last().attr('data-row');
if(i != row){
jQuery.ajax({url:'/index.php',
type: 'GET',
data:{act:'ajaxForHouses',row:row,date:myDate},
dataType: 'html',
timeout: 1000,
async : true,
error: function(){
},
success: function(result){
$('.rooms_show_ul').append(result);
}
});
i = row;
}
}
});
});
</script>
$(function(){
var i = 0 ;
$(window).scroll(function(){
// 当滚动到最底部以上50像素时, 加载新内容
if ($(document).height() - $(this).scrollTop() - $(this).height()<270){
var myDate = new Date();
row = $('.rooms_show_ul').children('li').last().attr('data-row');
if(i != row){
jQuery.ajax({url:'/index.php',
type: 'GET',
data:{act:'ajaxForHouses',row:row,date:myDate},
dataType: 'html',
timeout: 1000,
async : true,
error: function(){
},
success: function(result){
$('.rooms_show_ul').append(result);
}
});
i = row;
}
}
});
});
</script>