MxWeiXinPF.Web/obj/Release/Package/PackageTmp/templatesstore/js/slide.js

(开头部分) 5KB

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

/* 需要结合jquery一起使用 */

var timer = null;
var offset = 5000;
var currIndex = 0;
var liStep = 80; //LI宽度
var liSpacing = 16; //LI间隔
var moveTime = 300; //移动速度,毫秒
var imgCount = 0; //图片数量
var imgWidth = 0; //图片总长度
var scrollWidth = 0; //滚动区域宽量

//大图交替轮换
function slideImage(i) {
    $("#pic_show img").hide();
    $('#pic_box').height($("#pic_show img").eq(i - 1).height());
    $("#pic_show img").eq(i - 1).animate({ opacity: 'show' }, 800);
}
//bind thumb a
function hookThumb() {
    $('#pic_scroll ul li a').bind('click', function () {
        if (timer) {
            clearTimeout(timer);
        }
        currIndex = $('#pic_scroll ul li').index($(this).parent()) + 1;
        rechange(currIndex);
        slideImage(currIndex);
        timer = window.setTimeout(slidePlay, offset);
        this.blur();
        return false;
    });
}
//缩略图左右按钮绑定事件
function smallBtnSlide() {
    $('.scroll_box .small_prev').bind('click', function () {
        if (timer) {
            clearTimeout(timer);
        }
        currIndex--;
        if (currIndex < 1) currIndex = imgCount;
        rechange(currIndex);
        slideImage(currIndex);
        moveScroll(currIndex);
        timer = window.setTimeout(slidePlay, offset);
    });
    $('.scroll_box .small_next').bind('click', function () {
        if (timer) {
            clearTimeout(timer);
        }
        currIndex++;
        if (currIndex > imgCount) currIndex = 1;
        rechange(currIndex);
        slideImage(currIndex);
        moveScroll(currIndex);
        timer = window.setTimeout(slidePlay, offset);
    });
}
//按钮绑定事件
function btnSlide() {
    $('.slide_box .big_prev,.scroll_box .small_prev').bind('click', function () {
后面还有 114 行代码,购买后查看完整代码

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

AI 解读

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

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