Change meni lvl-1 action

This commit is contained in:
Roman Pyrih
2025-10-24 09:55:19 +02:00
parent c9ab0d3734
commit 46e045229e
6 changed files with 49 additions and 20 deletions

View File

@@ -1,31 +1,32 @@
$(function () {
function activateProductBox(boxHref) {
$(".row", productList).removeClass("active")
$(productList).find(`#${boxHref}`).addClass("active")
console.log($(productList).find(`#${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")
var productList = $('.colors-preview')
$('.colors-preview', productList).first().addClass('active')
$("#nav_tabs li a").on("click", function () {
$('#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")
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")
$('#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")
$('#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')
})
})
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -133,12 +133,24 @@ header#header {
height: 54px;
align-content: center;
&:hover {
&.active {
> .submenu {
opacity: 1;
visibility: visible;
}
> a {
i {
transform: scale(-1);
}
}
}
// &:hover {
// > .submenu {
// opacity: 1;
// visibility: visible;
// }
// }
> a {
display: flex;
flex-direction: row;

BIN
templates_user/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -500,4 +500,20 @@
$(this).parent().parent().find('ul:first').slideToggle();
});
}
if ( windowsize > 991 ) {
$(function () {
$('body').on(
click_event,
'#header-nav #header-mine-menu .lvl-1 >li.parent >a',
function (e) {
e.preventDefault()
$(this).parent().toggleClass('active');
}
)
})
}
</script>