WebRoot/static/os/js/goodsDetail.js

(开头部分) 6KB

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

$(function () {

});

/**
 * 导航分类栏显示及颜色变换
 */
$(function () {
    $('#J_navCategory').mouseover(function () {
        $('.site-category').css('display', 'block');
    })
    $('#J_navCategory').mouseout(function () {
        $('.site-category').css('display', 'none');
    })
});

/**
 * 图片介绍动画切换效果
 */
$(function () {
    $("#goodsPicList").on('click', 'li', function () {
        $("#goodsPicList li").removeClass("current");
        $(this).addClass("current");
        var largePath = $(this).children("img").attr("src");
        $("#J_BigPic").attr({
            src: largePath
        })
    });
    $("#goodsPicList li:first").click(); //第一张图片
})

/**
 * 导航悬浮
 */
$(window).scroll(function () {
    var $this = $(this);
    var targetTop = $(this).scrollTop();
    var height = $(window).height();

    //document.title=targetTop;
    //控制导航悬浮
    if (targetTop > 800) {
        $("#goodsSubBar").css('display', 'block');
    } else {
        $("#goodsSubBar").css('display', 'none');
    }

    if (targetTop > $("#goodsDesc").offset().top - 100 && targetTop < $("#goodsParam").offset().top - 100) {
        $(".goods-sub-bar .detail-list").find("li").removeClass("current");
        $(".goods-sub-bar .detail-list").find("li").eq(0).addClass("current");
    } else if (targetTop > $("#goodsParam").offset().top - 100 && targetTop < $("#goodsComment").offset().top - 100) {
        $(".goods-sub-bar .detail-list").find("li").removeClass("current");
        $(".goods-sub-bar .detail-list").find("li").eq(1).addClass("current");
    }
});


/**
 * 导航悬浮点击事件
 */
后面还有 158 行代码,购买后查看完整代码

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

AI 解读 AI

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

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