1$(function () { 2 3 var popupHideDelay; 4 $(".submenu").mouseenter(function (e) { 5 var self = $(this); 6 var a = self.find("a:first-child"); 7 var s = self.find(".menupopup"); 8 s.removeClass("fn-hide"); 9 a.addClass("active"); 10 clearTimeout(popupHideDelay); 11 }).mouseleave(function () { 12 var self = $(this); 13 var a = self.find("a:first-child"); 14 var s = self.find(".menupopup"); 15 popupHideDelay = setTimeout(function () { 16 s.addClass("fn-hide"); 17 a.removeClass("active"); 18 }, 10); 19 }); 20 $(".menupopup").mouseenter(function () { 21 clearTimeout(popupHideDelay); 22 }).mouseleave(function () { 23 var self = this; 24 popupHideDelay = setTimeout(function () { 25 $(self).addClass("fn-hide"); 26 }, 10); 27 }); 28 $(".menu li").mouseover(function () { 29 $(this).find(".tooltip").removeClass("fn-hide"); 30 }) 31 $(".menu li").mouseout(function () { 32 $(this).find(".tooltip").addClass("fn-hide"); 33 }) 34 $('.menu-btn.new-games').on('click', function () { 35 $('.new-games-pop-up').toggleClass('fn-hide'); 36 event.stopPropagation(); 37 }); 38 39 $(document).on('click', function () { 40 $('.new-games-pop-up').addClass('fn-hide'); 41 }); 42 43 $('.new-games-pop-up').on('click', function (event) { 44 event.stopPropagation(); // Mencegah event bubbling agar klik di dalam pop-up tidak menutup pop-up 45 }); 46 47 // Show the new games pop-up when the menu icon is clicked 48 $('.menu-mobile i:contains("menu")').click(function () { 49 // hide search form 50 $('.search-form').css('display', 'none'); 51 $('.right-btn-mobile .search-btn').css('display', 'block'); 52 53 // Show the pop-up 54 $('.new-games-pop-up-mobile').removeClass('fn-hide'); 55 // Hide the menu icon and show the close icon 56 $(this).addClass('fn-hide'); 57 $('.menu-mobile i:contains("close")').removeClass('fn-hide'); 58 }); 59 60 // Hide the pop-up when the close icon is clicked 61 $('.menu-mobile i:contains("close")').click(function () { 62 // Hide the pop-up 63 $('.new-games-pop-up-mobile').addClass('fn-hide'); 64 // Show the menu icon again and hide the close icon 65 $(this).addClass('fn-hide'); 66 $('.menu-mobile i:contains("menu")').removeClass('fn-hide'); 67 }); 68 69 $(window).on('scroll', function () { 70 if (!$('.new-games-pop-up-mobile').hasClass('fn-hide')) { 71 // Jika pop-up tidak di-hide, ubah posisinya menjadi static 72 $('.new-games-pop-up-mobile').addClass('static-position'); 73 } else { 74 // Jika pop-up di-hide, kembalikan ke posisi fixed 75 $('.new-games-pop-up-mobile').removeClass('static-position'); 76 } 77 }); 78 79 // Hide the pop-up when clicking outside of the pop-up area 80 $(document).click(function (event) { 81 var target = $(event.target); 82 83 // Check if the clicked target is not part of the menu or pop-up area 84 if (!target.closest('.menu-mobile, .new-games-pop-up-mobile').length) { 85 // Hide the pop-up and reset icons 86 $('.new-games-pop-up-mobile').addClass('fn-hide'); 87 $('.menu-mobile i:contains("close")').addClass('fn-hide'); 88 $('.menu-mobile i:contains("menu")').removeClass('fn-hide'); 89 } 90 }); 91 92 // Prevent the menu or pop-up from closing when clicking inside them 93 $('.menu-mobile, .new-games-pop-up-mobile').click(function (event) { 94 event.stopPropagation(); 95 }); 96 97 // Function to handle search button behavior based on window width 98 function handleSearchFunctionality() { 99 if ($(window).width() <= 600) { 100 // Show the search form when the search button is clicked and hide the search button itself 101 $('.right-btn-mobile .search-btn').off('click').on('click', function () { 102 // hide new games pop-up 103 $('.new-games-pop-up-mobile').addClass('fn-hide'); 104 $('.menu-mobile i:contains("close")').addClass('fn-hide'); 105 $('.menu-mobile i:contains("menu")').removeClass('fn-hide'); 106 107 // Show the search form 108 $('.search-form').css('display', 'block'); 109 110 // Hide the search button 111 $(this).css('display', 'none'); 112 }); 113 114 // Hide the search form and show the search button again only if the search form is displayed 115 $(document).off('click').on('click', function (event) { 116 var target = $(event.target); 117 118 // Check if the clicked target is not part of the search area or search button 119 if (!target.closest('.search-form, .search-btn').length) { 120 // Check if the search form is currently displayed as block 121 if ($('.search-form').css('display') === 'block') { 122 // Hide the search form 123 $('.search-form').css('display', 'none'); 124 125 // Show the search button again 126 $('.right-btn-mobile .search-btn').css('display', 'block'); 127 } 128 } 129 }); 130 131 // Prevent the search form from hiding when clicking inside it 132 $('.search-form').off('click').on('click', function (event) { 133 event.stopPropagation(); 134 }); 135 } else { 136 // Remove the custom click events for larger screens 137 $('.right-btn-mobile .search-btn').off('click'); 138 $(document).off('click'); 139 $('.search-form').off('click'); 140 } 141 } 142 143 // Call the function on document ready and when window is resized 144 handleSearchFunctionality(); 145 $(window).resize(function () { 146 handleSearchFunctionality(); 147 });
148 149 if ($(window).width() <= 600) { 150 $('#Search-InArea').attr('placeholder', 'Search'); 151 } 152}) 153
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.