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 () {
function activateProductBox(boxHref) { function activateProductBox(boxHref) {
$(".row", productList).removeClass("active") $('.row', productList).removeClass('active')
$(productList).find(`#${boxHref}`).addClass("active") $(productList).find(`#${boxHref}`).addClass('active')
console.log($(productList).find(`#${boxHref}`)) console.log($(productList).find(`#${boxHref}`))
} }
var productList = $(".colors-preview") var productList = $('.colors-preview')
$(".colors-preview", productList).first().addClass("active") $('.colors-preview', productList).first().addClass('active')
$("#nav_tabs li a").on("click", function () { $('#nav_tabs li a').on('click', function () {
event.preventDefault() event.preventDefault()
var boxHref = $(this).attr("href").substring(1) var boxHref = $(this).attr('href').substring(1)
$(this).parent().parent().find("li").removeClass("active") $(this).parent().parent().find('li').removeClass('active')
$(this).parent().addClass("active") $(this).parent().addClass('active')
activateProductBox(boxHref) activateProductBox(boxHref)
}) })
$("#nav_tabs li").first().addClass("active") $('#nav_tabs li').first().addClass('active')
$("#characteristics-box .scontainer-content .row").first().addClass("active") $('#characteristics-box .scontainer-content .row').first().addClass('active')
}) })
$(function () { $(function () {
$("#scontainer-83 .box-data ul li").on('click', function(){ $('#scontainer-83 .box-data ul li').on('click', function () {
$('#scontainer-83 .box-data ul li')
$("#scontainer-83 .box-data ul li").not($(this)).find('p').removeClass('active') .not($(this))
$(this).find('p').toggleClass("active") .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; height: 54px;
align-content: center; align-content: center;
&:hover { &.active {
> .submenu { > .submenu {
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
} }
> a {
i {
transform: scale(-1);
}
}
} }
// &:hover {
// > .submenu {
// opacity: 1;
// visibility: visible;
// }
// }
> a { > a {
display: flex; display: flex;
flex-direction: row; 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(); $(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> </script>