源代码/shop/WebRoot/js/fadebanner.js

(开头部分) 2KB

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

(function($){
    $.fn.fadeBanner = function(){
        var counter = 0,
            maxCount = 0,
            timer = null,
            liList = $(this).find("li"),
            getControl = $(this).attr("control-fade"),
            controlLiList,tabSet,
            tabControl = $(this).attr("control-tab");

        //ҳ�������ɣ���ʾ��һ��ͼƬ
        liList.css("display" , "none");
        liList.eq(0).css("display" , "");

        maxCount = liList.size();


        setTimer();

        if(getControl){
            controlFadePhoto(getControl);
        }

        if(tabControl){
            controlTabPhoto(tabControl);
        }

        function setTimer(){
            clearInterval(timer);
            timer = setInterval(slidePhoto, 3000);
        }

        function slidePhoto(reverse) {
            if(!liList.is(':animated')){

                if (reverse) {
                    counter = counter - 1;
                } else {
                    counter = counter + 1;
                }

                if(counter == maxCount){
                    counter = 0;
                }

                if(counter < 0){
                    counter = maxCount - 1;
                }

                liList.fadeOut(1000);
                liList.eq(counter).fadeIn(1000);

                if(controlLiList){
                    controlLiList.removeClass("active");
                    controlLiList.eq(counter).addClass("active");
                }
            }
        }

        function controlFadePhoto(_getControl){
后面还有 24 行代码,购买后查看完整代码

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

AI 解读 AI

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

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