zoukankan      html  css  js  c++  java
  • pinterest 瀑布流

    <!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 src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    var i = 100;
    $(window).bind("scroll", function () {
    ($(document).scrollTop() + $(window).height() > $(document).height() - i) && yourDemoFunction();
    });
    function yourDemoFunction() {
    $("#bod").height($("#bod").height() + 1000);
    i += 100;
    $(window).bind("scroll", function () {
    ($(document).scrollTop() + $(window).height() > $(document).height() - i) && yourDemoFunction();
    })
    }
    </script>
    </head>
    <body id="bod" style="height:1000px;">
    </body>
    </html>

    喜欢的朋友请帮忙点个赞!!!
  • 相关阅读:
    事件的解除与绑定
    JavaScript 继承
    left 和 margin-left
    表格 DOM 操作
    基于继承的拖拽
    碰撞运动
    弹性运动
    完美运动框架
    JS 操作 Cookie
    DIV拖拽
  • 原文地址:https://www.cnblogs.com/mchuang/p/5242638.html
Copyright © 2011-2022 走看看