求教加载更多的效果着呢么做啊 加载更多的效果怎么做啊,就是会自动加载下一页的文章内容到首页而不用翻页来看那样子的,有没有直接用的什么代码或者插件之类的,新手不懂。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是直接改变div的值吗?不很明白你的意思 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script></head><body > <div id="divId" style="background:#f00; height:1000px; overflow:hidden;"> <div style="height:1500px;"></div></div><script type="text/javascript"> window.onscroll = function () { var a = document.documentElement.scrollTop == 0 ? document.body.clientHeight : document.documentElement.clientHeight; var b = document.documentElement.scrollTop == 0 ? document.body.scrollTop : document.documentElement.scrollTop; var c = document.documentElement.scrollTop == 0 ? document.body.scrollHeight : document.documentElement.scrollHeight; if (b != 0) { if (a + b == c) { showmore(); } } } function showmore() { //alert($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height())); if(parseInt($('#divId').height()) < ($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height()))) { $('#divId').css('height', '+=100px'); } }</script> </body></html> jquery就可以实现 ajax动态修改html的内容 如果想要更好的用户体验的话 可以添加一点动画的效果什么的 ajax 怎么读取下一页的内容加载到首页来啊,请教有没有这方面的源码给看看 滑动门一个问题,鼠标经过DIV层时,如何自动触发这一个层?调了好久没有弄出来。 向高手在线求助:如何实现二级多个select 联动 请问怎么写,不可以零开头的数字的正则表达式,3Q 如何用jquery获取这个里的html div元素 求一段比较特殊的级联代码!! 请教js问题 ★★求一个树,要求可以让用户右键点击某节点,弹出增加、删除菜单!功能最好完备一些★★ seabell(百合心)请进来看一下 关于背景图的问题,急!!! 为什么我点击浏览器中的“脚本调试程序”,之后不会打开脚本调试程序哪? 求爱逛街网站一个热图滑动特效代码 jquery 根据时间的类型来控制显示还是隐藏时间的选择范围
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body >
<div id="divId" style="background:#f00; height:1000px; overflow:hidden;">
<div style="height:1500px;"></div>
</div>
<script type="text/javascript">
window.onscroll = function () {
var a = document.documentElement.scrollTop == 0 ? document.body.clientHeight : document.documentElement.clientHeight;
var b = document.documentElement.scrollTop == 0 ? document.body.scrollTop : document.documentElement.scrollTop;
var c = document.documentElement.scrollTop == 0 ? document.body.scrollHeight : document.documentElement.scrollHeight;
if (b != 0) {
if (a + b == c) {
showmore();
}
}
}
function showmore() {
//alert($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height()));
if(parseInt($('#divId').height()) < ($('#divId div:last-child').offset().top + parseInt($('#divId div:last-child').height()))) {
$('#divId').css('height', '+=100px');
}
}
</script>
</body>
</html>