src/ZKEACMS.Product/Scripts/product-ecommerce.js

(完整代码) 1KB

/*! http://www.zkea.net/
 * Copyright (c) ZKEASOFT. All rights reserved.
 * http://www.zkea.net/licenses */

$(".product-ecommerce").each(function () {
    var ecommerce = $(this);
    $(".tag-grop", ecommerce).each(function () {
        $("input[type=radio]:first", this).prop("checked", true);
    });
    $(".thumbnails a", ecommerce).on("click", function () {
        $(".stage", ecommerce).attr("src", $(this).data("src"));
        $(this).parent().addClass("active").siblings().removeClass("active");
    });
    ecommerce.on("click", ".quantity-minus", function () {
        var quantity = Number($.trim($(this).closest(".quantity-set").find(".quantity").text()));
        if (quantity > 1) {
            quantity -= 1;
            ecommerce.find(".add-to-basket").data("quantity", quantity);
            $(this).closest(".quantity-set").find(".quantity").text(quantity);
        }
    });
    ecommerce.on("click", ".quantity-plus", function () {
        var quantity = Number($.trim($(this).closest(".quantity-set").find(".quantity").text()));
        quantity += 1;
        ecommerce.find(".add-to-basket").data("quantity", quantity);
        $(this).closest(".quantity-set").find(".quantity").text(quantity);
    });
});

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

AI 解读 AI

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

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