helpcenter/Web/js/help/menuselector.js
2020-12-01 16:46:41 +03:00

27 lines
1.3 KiB
JavaScript

$(document).ready(function() {
$(".menuleft a, .bottommenu a").each(function (e) {
var t = window.location.href.replace(window.location.hash, "").toLowerCase();
this.href.trim().toLowerCase() == t ? $(this).addClass("selected") : $(this).removeClass("selected")
});
function e() {
n = window.innerWidth, l > n ? location.reload(!0) : n > l ? location.reload(!0) : n = l
};
var t, n = window.innerWidth,
l = 1190;
$(window).resize(function() {
var i = window.innerWidth;
clearTimeout(t), (n > l && l > i || l > n && i > l) && (t = setTimeout(e, 100))
})
}), window.innerWidth <= 1190 && ($(document).ready(function() {
var e = $(".menuleft").actual("height");
$(".menuleft").height(e).jScrollPane(), $(".mobile_table_contents").on("click", function() {
$(".menuleft").slideDown("fast"), $(".search_line").show(), $(".MainHelpCenter, header, footer").one("click", function() {
$(".menuleft").slideUp("fast"), $(".search_line").hide()
})
}), $(".menuleft a").each(function(e) {
if ("700" == $(this).css("font-weight") || "bold" == $(this).css("font-weight")) {
var t = $(this).text();
return $("div.mobile_table_contents span").text(t), !1
}
})
}));