1jQuery(document).ready(function($){ 2 "use strict"; 3 4 if($('.popover-button').length){ 5 $('.popover-button').each(function(){ 6 var p_btn = $(this),popover = $(this).closest('.popover-button-wrapper'), p_content = popover.find('.popover-box'); 7 8 if(!p_content.length){ 9 p_content= $(document.createElement('div')).addClass('popover-box'); 10 11 var p_title = p_btn.data('pop'), p_text = p_btn.data('pop-text'), p_align = p_btn.data('pop-align'); 12 var close_btn = $(document.createElement('span')).addClass('close-pop'); 13 14 p_content.prepend(close_btn); 15 16 if(!p_align || p_align==''){ p_align = 'bottom'; } 17 18 p_content.addClass('pop-' + p_align); 19 20 if(p_title && p_title!=''){ 21 p_content.prepend('<h4>'+ p_title +'</h4>'); 22 } 23 24 if(p_text && p_text!=''){ 25 p_content.append('<div>'+ p_text +'</div>'); 26 } 27 p_btn.after(p_content); 28 29 close_btn.on('click',function(e){ 30 e.preventDefault(); 31 $(this).closest('.popover-button-wrapper').removeClass('pop-it'); 32 33 }); 34 } 35 36 $(this).on("click", function(e){ 37 e.preventDefault(); 38 $(this).closest('.popover-button-wrapper').toggleClass('pop-it'); 39 }); 40 41 }); 42 } 43 44 function prepare_gummenu(menus){ 45 46 $('.arrow', menus).each(function(f, index){ 47 48 $(index).on('click', function(e){ 49 e.preventDefault(); 50 var curmenu = $(this).closest('li'); 51 curmenu.siblings().removeClass('menu-open'); 52 curmenu.toggleClass('menu-open'); 53 }); 54 }); 55 56 } 57 58 59 if($('.gum-menu').length){ 60 $('.gum-menu').each(function(){ 61 62 var themenu = $(this), menuwrapper = themenu.closest('.nav-wrapper'), btn = menuwrapper.find('.toggle-gum-menu'); 63 64 prepare_gummenu(themenu); 65 66 btn.unbind('click').on('click', function(e){ 67 e.preventDefault(); 68 themenu.toggleClass('toggle-collapse'); 69 70 }); 71 72 }); 73 } 74 75 if($("#totop_btn").length){ 76 $(window).on('scroll', function () { 77 78 var winHeight = $(window).height(); 79 80 if($('#wpadminbar').length){ 81 winHeight -= $('#wpadminbar').outerHeight(); 82 } 83 if ($(this).scrollTop() > winHeight) { 84 $("#totop_btn").fadeIn(); 85 } else { 86 $("#totop_btn").fadeOut(); 87 } 88 }); 89 90 $("#totop_btn").on('click', function () { 91 $("body,html").animate({ 92 scrollTop: 0 93 }, 94 600); 95 }); 96 } 97 98});
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.