Files
vidok.com/layout/js/main.js
Roman Pyrih 8c4f97abba New menu
2025-08-22 14:12:52 +02:00

38 lines
853 B
JavaScript

$('body').on(click_event, '.lang-change', function (e) {
if ($(this).hasClass('parent')) e.preventDefault()
if ($(this).hasClass('open')) $(this).removeClass('open')
else $(this).addClass('open')
})
$(document).ready(function () {
var hashValue = window.location.hash.substring(1)
if (hashValue) {
var hashText = hashValue.toUpperCase()
setTimeout(function () {
var $tabsBlock = $('ul.nav.nav-tabs[role="tablist"]')
if ($tabsBlock.length) {
$tabsBlock.find('li a').each(function () {
var tabText = $(this).text().trim().toUpperCase()
if (tabText === hashText) {
$(this).trigger('click')
setTimeout(function () {
$('html, body').animate(
{
scrollTop: $tabsBlock.offset().top - 150,
},
600
)
}, 500)
return false
}
})
}
}, 1000)
}
})