1(function ($) { 2 $(document).ready(function () { 3 4 // ââ FAQ Accordion âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 5 $(document).on('click', '.wpaap-faq-q', function () { 6 var $item = $(this).closest('.wpaap-faq-item'); 7 var $ans = $item.find('.wpaap-faq-a'); 8 var $icon = $(this).find('.wpaap-faq-icon'); 9 if ( $item.hasClass('wpaap-faq-open') ) { 10 $item.removeClass('wpaap-faq-open'); 11 $ans.slideUp(200); 12 if ( $icon.length ) $icon.text('â¼'); 13 } else { 14 $item.addClass('wpaap-faq-open'); 15 $ans.slideDown(200); 16 if ( $icon.length ) $icon.text('â²'); 17 } 18 }); 19 20 // Toggle danh sách Hotline trong Mẫu C 21 $(document).on("click", ".whp-toggle-phones-btn", function(e) { 22 e.preventDefault(); 23 $(this).next(".whp-agents-collapse").slideToggle(250); 24 }); 25 26 // Tá»± Äá»ng má» popup á» lần Äầu truy cáºp 27 if (typeof whpGetCookie === 'function') { 28 var autoOpened = whpGetCookie("whp_contact_auto_opened"); 29 if (!autoOpened) { 30 var isAdmin = (typeof whp_popup_ajax !== 'undefined' && whp_popup_ajax.isAdmin == 1); 31 if (!isAdmin) { 32 setTimeout(function() { 33 let btnIcon = $(".whp-contact-icon").first(); 34 if (btnIcon.length && !btnIcon.hasClass("only-call")) { 35 let btnClose = btnIcon.find(".whp-contact-icon-close"); 36 let content = $(".whp-contact-content").first(); 37 $(".whp-contact-greeting").hide(); 38 btnIcon.addClass("show-close"); 39 btnClose.addClass("active"); 40 content.addClass("active"); 41 whpSetCookie("whp_contact_auto_opened", "1", 1); 42 } 43 }, 1500); 44 } 45 } 46 } 47 48 let btnContact = $(".whp-contact-button"); 49 let greetingContact = $(".whp-contact-greeting"); 50 let btnCloseGreeting = $(".whp-contact-close-greeting"); 51 btnCloseGreeting.click(function () { 52 greetingContact.hide(); 53 }); 54 btnContact.click(function () { 55 let btnIcon = $(this).find(".whp-contact-icon"); 56 let btnClose = $(this).find(".whp-contact-icon-close"); 57 let content = $(this).prev(); 58 greetingContact.hide(); 59 if (btnIcon.hasClass("only-call")) { 60 let phone = btnIcon.data("phone"); 61 window.location.href = `tel:${phone}`; 62 } else { 63 btnIcon.toggleClass("show-close"); 64 btnClose.toggleClass("active"); 65 $(".whp-contact-content").not(content).removeClass("active"); 66 content.toggleClass("active"); 67 } 68 }); 69 $(window).click(function (e) { 70 let contactEle = $(".whp-contact"); 71 if (!contactEle.is(e.target) && contactEle.has(e.target).length === 0) { 72 let btnIcon = $(".whp-contact-icon"); 73 let btnClose = $(".whp-contact-icon-close"); 74 btnIcon.removeClass("show-close"); 75 btnClose.removeClass("active"); 76 if ($(".whp-contact-content").hasClass("active")) 77 return $(".whp-contact-content").removeClass("active"); 78 } 79 }); 80 }); 81 82 $(document).ready(function () { 83 if (typeof whpGetCookie !== 'function') return; 84 var isAdmin = (typeof whp_popup_ajax !== 'undefined' && whp_popup_ajax.isAdmin == 1); 85 var cookie_pop_up = isAdmin ? '' : whpGetCookie("whp_popup"); 86 if (!cookie_pop_up && $("#whp-popup").length) { 87 var delay = (typeof whp_popup_ajax !== 'undefined' && !isNaN(parseInt(whp_popup_ajax.delay))) 88 ? parseInt(whp_popup_ajax.delay) * 1000 89 : 8000; 90 91 function doShowPopup() { 92 if (whpGetCookie("whp_popup") && !isAdmin) return; 93 $("#whp-popup").addClass("whp-popup").removeClass("whp-hidden"); 94 $("#whp-popup .modal-box").addClass("show-modal"); 95 if (!isAdmin) whpSetCookie("whp_popup", true, 1); 96 97 $("#whp-popup .fa-times, #whp-popup .whp-popup-close, #whp-popup .icon-close").on("click", function () { 98 $("#whp-popup").removeClass("whp-popup").addClass("whp-hidden"); 99 $("#whp-popup .modal-box").removeClass("show-modal"); 100 }); 101 $(".whp-popup-background").on("click", function () { 102 $("#whp-popup").removeClass("whp-popup").addClass("whp-hidden"); 103 $("#whp-popup .modal-box").removeClass("show-modal"); 104 }); 105 } 106 107 if (delay === 0) { 108 doShowPopup(); 109 } else { 110 setTimeout(doShowPopup, delay); 111 } 112 } 113 }); 114})(jQuery);
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.