1let showAllContactVisible = false; 2$(function () { 3 $('#side-bar').on('click', function (e) { 4 if (e.target == this) { 5 let isLeft = !$(this).hasClass("sidebar-right"); 6 toggleSideBar(this, false, isLeft); 7 } 8 }); 9 $(".gamemenu").on('click', function () { 10 if ($(this).hasClass("open")) { 11 $(this).removeClass("open"); 12 } else { 13 $(this).parent().children("li.open").removeClass("open"); 14 $(this).addClass("open"); 15 } 16 }); 17 $('.menu-contact a').each(function () { 18 let $menuContact = $(this).closest('.menu-contact'); 19 let $allContact = $menuContact.find('.allContact'); 20 $(this).on('click', function (e) { 21 e.preventDefault(); 22 e.stopPropagation(); 23 if ($allContact.is(':visible')) { 24 $allContact.slideUp(); 25 } else { 26 $('.allContact').slideUp(); 27 $allContact.slideDown(); 28 } 29 }); 30 }); 31 $(document).on('click', function (e) { 32 $('.allContact').slideUp(); 33 }); 34}); 35 36function toggleSideBar(element, isShow, isLeft) { 37 let $parentElement = $(element).closest('.mainheader'); 38 let $sideBar = $('#side-bar'); 39 let $mainNavbar = $sideBar.find('.main-navbar'); 40 isLeft = $parentElement.length != 0 ? (!$parentElement.hasClass("mainheader1-design2") && !$parentElement.hasClass("mainheader1-design6") && !$parentElement.hasClass("mainheader1-design7")) : isLeft; 41 if (isShow) { 42 $sideBar.fadeIn(200); 43 if (isLeft) { 44 $mainNavbar.css({ left: "-100%" }).animate({ left: "0" }, 200); 45 $sideBar.addClass("sidebar-left"); 46 } else { 47 $mainNavbar.css({ right: "-100%" }).animate({ right: "0" }, 200); 48 $sideBar.addClass("sidebar-right"); 49 } 50 $("body").css({ overflow: "hidden" }); 51 } else { 52 $sideBar.fadeOut(200); 53 if (isLeft) { 54 $mainNavbar.animate({ left: "-100%" }, 200, function () { 55 $(this).removeAttr("style"); 56 }); 57 $sideBar.removeClass("sidebar-left"); 58 } else { 59 $mainNavbar.animate({ right: "-100%" }, 200, function () { 60 $(this).removeAttr("style"); 61 }); 62 $sideBar.removeClass("sidebar-right"); 63 } 64 $(".gamemenu").removeClass("open"); 65 $("body").css({ overflow: "" }); 66 } 67}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.