// 窗口滚动到一定位置,出现返回顶部图标
$(window).bind("scroll", function() {
var top = document.documentElement.scrollTop + document.body.scrollTop;
if (top >= 500) {
$('.xnto_top').show();
} else {
$('.xnto_top').hide();
}
});
// 文章随鼠标滚动即时加载(不使用mousewheel)
$(window).bind("scroll", function() {
var top = document.documentElement.scrollTop + document.body.scrollTop;
var textheight = $(document).height();
if (textheight - top - $(window).height() <= 100) {
$('#tip_load_msg').html("<img src='public/images/mk/article/load1.gif?version=1.0.1' width='100px' height='100px' />");
$(window).bind("scroll", function() {
var top = document.documentElement.scrollTop + document.body.scrollTop;
if (top >= 500) {
$('.xnto_top').show();
} else {
$('.xnto_top').hide();
}
});
// 文章随鼠标滚动即时加载(不使用mousewheel)
$(window).bind("scroll", function() {
var top = document.documentElement.scrollTop + document.body.scrollTop;
var textheight = $(document).height();
if (textheight - top - $(window).height() <= 100) {
$('#tip_load_msg').html("<img src='public/images/mk/article/load1.gif?version=1.0.1' width='100px' height='100px' />");
// 下面使用要处理数据的函数
load_more_data();
}});
function load_more_data () {...}
====================================================================================================================================
// 滚动到底部
$(document).scrollTop($(document).height());