更改

跳到导航 跳到搜索
添加766字节 、​ 2021年1月25日 (一) 13:49
无编辑摘要
第7行: 第7行:  
   s.parentNode.insertBefore(hm, s);
 
   s.parentNode.insertBefore(hm, s);
 
})();
 
})();
 +
 +
/* 回到顶部 */
 +
$(function() {
 +
    var txt = " ",
 +
        btn = $('<div/>', {
 +
        "text": "返回顶部",
 +
        "attr": {
 +
            "title": "返回顶部",
 +
            "class": "backToTop"
 +
        },
 +
            'css': {
 +
                'user-select': 'none'
 +
            },
 +
            'on': {
 +
                'click': function() {
 +
                    $("html, body").animate({
 +
                        scrollTop: 0
 +
                    }, 120);
 +
                }
 +
            }
 +
        }).appendTo(document.body);
 +
    $(window).on('scroll', function() {
 +
        $(document).scrollTop() > 0 ? btn.fadeIn() : btn.fadeOut();
 +
    }).scroll();
 +
});
 +
 +
$('.heimu a').on("click", function() {
 +
if (!$(this).closest('.heimu').is(':active, :focus')) return false;
 +
});
15,684

个编辑

导航菜单