zoukankan      html  css  js  c++  java
  • jQuery回到顶部

    $(function(){
        $(window).scroll(function () {
            if ($(this).scrollTop() > 400) {   //scrollTop() 方法返回或设置匹配元素的滚动条的垂直位置。
                $('#gotop').fadeIn();  
            } else {
                $('#gotop').fadeOut();
            }
        });
        $("#gotop").click(function(){
            $("html,body").animate({scrollTop:0},"slow");
            return false;
        });   
        // 当用户滚动指定的元素时,会发生 scroll 事件。
        // scroll 事件适用于所有可滚动的元素和 window 对象(浏览器窗口)。
        // scroll() 方法触发 scroll 事件,或规定当发生 scroll 事件时运行的函数。 
    }); 
  • 相关阅读:
    SAP Easy tree
    SAP Column tree
    SAP Tree
    SAP 文本框多行输入
    SAP -SE30 程序运行时间分析
    SAP 实例- 页签tabsrip
    ABAP CDS
    ABAP CDS
    ABAP CDS
    ABAP CDS
  • 原文地址:https://www.cnblogs.com/cosyer/p/6721036.html
Copyright © 2011-2022 走看看