Files
vidok.com/layout/js/custom.js
2024-11-21 14:26:28 +01:00

31 lines
914 B
JavaScript

$(function () {
function activateProductBox(boxHref) {
$(".row", productList).removeClass("active")
$(productList).find(`#${boxHref}`).addClass("active")
console.log($(productList).find(`#${boxHref}`))
}
var productList = $(".colors-preview")
$(".colors-preview", productList).first().addClass("active")
$("#nav_tabs li a").on("click", function () {
event.preventDefault()
var boxHref = $(this).attr("href").substring(1)
$(this).parent().parent().find("li").removeClass("active")
$(this).parent().addClass("active")
activateProductBox(boxHref)
})
$("#nav_tabs li").first().addClass("active")
$("#characteristics-box .scontainer-content .row").first().addClass("active")
})
$(function () {
$("#scontainer-83 .box-data ul li").on('click', function(){
$("#scontainer-83 .box-data ul li").not($(this)).find('p').removeClass('active')
$(this).find('p').toggleClass("active")
})
})