Jquery实现仿腾讯娱乐频道焦点图(幻灯片)特效

2020-05-24 21:21:20易采站长站整理

            btnL.onclick = function(){
                clearInterval(timerA);
                config.index -= 1;
                run(config.index, !0)
            }
            $(‘slide’).onmouseover = function(event){
                config.index = Math.ceil(Math.abs(parseInt($(‘_slide’).getElementsByTagName(‘ul’)[0].style.left)/slideList[0].offsetWidth));
                clearInterval(timerA);
                timerA = null;
                event.stopPropagation();
            }
            $(‘slide’).onmouseout = function(event){
                if (config.imgAuto) {
                    autoSwitch();
                }
                config.index = config.curImg;
                event.stopPropagation();
            }
            if(/ipad;/i.test(navigator.userAgent.toLowerCase())){
                touchFun(e);
            }
            // 自动切换
            if (config.imgAuto) {
                autoSwitch();
            }
               dotList = $(“focus_dot”).getElementsByTagName(‘li’);
                var n;
                for(n = 0; n < dotList.length; n++ ){