skin/js/gdcms.js

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


        var count=$(".nav").find("li").length;
        var w=Math.floor(100 / count * 100) / 100;
        $(".nav").find("li").css("width",w+"%");
    

        $(function(){
            //search
            $('.sea').on('click','.open',function(e){
                $('.sea').toggleClass('open');
            });
        });


    

        $(document).ready(function () {
            $('.banner').slick({
                autoplay: true,      // 自动播放
                autoplaySpeed: 4000, // 播放间隔
                dots: true,           // 开启轮播图圆点
            });
        });
    

         $(function(){
             //窗口显示才加载
        var wrapTop = $(".gun").offset().top;
        var istrue = true;
        var $li = $(".gun").find("li");
        $li.each(function() {
            $(this).find("em").attr("data-to", $(this).find("em").text())
        })
        $(window).on("scroll",
            function() {
                var s = $(window).scrollTop();
                if (s > wrapTop - 500 && istrue) {
                    $(".timer").each(count);
                    function count(a) {
                        var b = $(this);
                        a = $.extend({},
                            a || {},
                            b.data("countToOptions") || {});
                        b.countTo(a)
                    };
                    istrue = false;
                };
            })
        //设置计数
        $.fn.countTo = function (options) {
            options = options || {};
            return $(this).each(function () {
                //当前元素的选项
                var settings = $.extend({}, $.fn.countTo.defaults, {
                    from:            $(this).data('from'),
                    to:              $(this).data('to'),
                    speed:           $(this).data('speed'),
                    refreshInterval: $(this).data('refresh-interval'),
                    decimals:        $(this).data('decimals')
                }, options);
后面还有 188 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。