first commit
This commit is contained in:
23
layout/js/custom-turen.js
Normal file
23
layout/js/custom-turen.js
Normal file
@@ -0,0 +1,23 @@
|
||||
$(function() {
|
||||
|
||||
function activateProductBox(boxHref) {
|
||||
$(".turen-info", productList).removeClass("active")
|
||||
$(productList).find(`#${boxHref}`).addClass("active")
|
||||
}
|
||||
|
||||
var productList = $("#product-preview-box .scontainer-content")
|
||||
$(".turen-info", 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")
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user