zoukankan      html  css  js  c++  java
  • JQ_返回顶部

    $(function(){
    $('#goto_top_btn').click(function() {
    var s = $(window).scrollTop(),h = $(window).height();
    if (s > h * 2) {
    $('html, body').scrollTop(0);
    } else {
    $('html,body').animate({scrollTop: '0px'}, 300);
    }
    });
    });

    <div class="fix-layout">
    <div id="_returnTop_layout_inner" class="gb-operation-area">
    <a id="goto_top_btn" class="gb-operation-button return-top" href="javascript:;">
    <i class="gb-operation-icon" title="返回顶部"></i>
    <span class="gb-operation-text">顶部</span>
    </a>
    <a id="" class="gb-operation-button report" href="javascript:;" style="display: block;">
    <i class="gb-operation-icon" title="举报"></i>
    <span class="gb-operation-text">举报</span>
    </a>
    </div>
    </div>

  • 相关阅读:
    申请奖励加分
    寒假学习01
    加分项及建议
    12月30日总结
    12月17日 期末总结
    12月31日总结
    12月15日总结
    12月28日总结
    01月03日总结
    01月05日总结
  • 原文地址:https://www.cnblogs.com/ingstyle/p/4668518.html
Copyright © 2011-2022 走看看