1jQuery(document).ready(function($){ 2 // CUSTOM POPUPS 3 var runPopups = function(){ 4 var popups = $('.popup-modal'); 5 6 popups.each(function(){ 7 var currentPopup = $(this); 8 var id = currentPopup.attr('id'); 9 var useCookie = currentPopup.data('cookie'); 10 var expire = currentPopup.data('expire'); 11 var showAfter = currentPopup.data('show'); 12 var popupTrigger = currentPopup.data('trigger'); 13 14 $('.' + popupTrigger).click(function(e){ 15 e.preventDefault(); 16 17 if($('#mobile-menu-wrap, #mobile-menu-backdrop').hasClass('active')){ 18 $('#mobile-menu-wrap, #mobile-menu-backdrop').toggleClass('active'); 19 } 20 currentPopup.fadeToggle(200); 21 }); 22 23 currentPopup.find('#popup-close').click(function(){ 24 currentPopup.fadeToggle(200); 25 }); 26 27 if(useCookie && expire && showAfter){ 28 doCookie(currentPopup, id, expire, showAfter); 29 } 30 }); 31 32 function doCookie(popup, id, expire, show) { 33 var hidePopup = $.cookie(id); 34 35 function show_subscribe(){ 36 if(hidePopup != 'true') { 37 popup.fadeIn(); 38 } 39 } 40 41 setTimeout(show_subscribe, show*1000); 42 $.cookie(id, 'true', { expires: expire, path: '/' }); 43 } 44 } 45 46 runPopups(); 47});
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.