1/** 2 * scroll up 3 */ 4jQuery(document).ready(function(){ 5 jQuery("#scroll-up").hide(); 6 jQuery(function () { 7 jQuery(window).scroll(function () { 8 if (jQuery(this).scrollTop() > 1000) { 9 jQuery('#scroll-up').fadeIn(); 10 } else { 11 jQuery('#scroll-up').fadeOut(); 12 } 13 }); 14 jQuery('a#scroll-up').click(function () { 15 jQuery('body,html').animate({ 16 scrollTop: 0 17 }, 800); 18 return false; 19 }); 20 jQuery('a[href^=#]:not(.no-scroll)').click(function () { 21 var speed = 800; 22 var href= jQuery(this).attr("href"); 23 var target = jQuery(href == "#" || href == "" ? 'html' : href); 24 var position = target.offset().top; 25 jQuery('body,html').animate({scrollTop:position}, speed, 'swing'); 26 return false; 27 }); 28 }); 29}); 30 31/** 32 * navigation 33 */ 34( function() { 35 var container, button, menu; 36 37 container = document.getElementById( 'site-navigation' ); 38 if ( ! container ) 39 return; 40 41 button = container.getElementsByTagName( 'h2' )[0]; 42 if ( 'undefined' === typeof button ) 43 return; 44 45 menu = container.getElementsByTagName( 'ul' )[0]; 46 47 // Hide menu toggle button if menu is empty and return early. 48 if ( 'undefined' === typeof menu ) { 49 button.style.display = 'none'; 50 return; 51 } 52 53 if ( -1 === menu.className.indexOf( 'nav-menu' ) ) 54 menu.className += 'nav-menu'; 55 56 button.onclick = function() { 57 if ( -1 !== container.className.indexOf( 'main-small-navigation' ) ) 58 container.className = container.className.replace( 'main-small-navigation', 'main-navigation' ); 59 else 60 container.className = container.className.replace( 'main-navigation', 'main-small-navigation' ); 61 }; 62} )(); 63 64/** 65 * accordion, toggle, tabs 66 */ 67+function($) { 68 $(".accordion .accordion-header").click(function() { 69 $(this).next().slideToggle(); 70 $(this).next().siblings(".accordion-content").slideUp(); 71 $(this).toggleClass("active"); 72 $(this).siblings(".accordion-header").removeClass("active"); 73 }); 74 75 $(".toggle .toggle-header").click(function() { 76 $(this).next().slideToggle(); 77 $(this).toggleClass("active"); 78 }); 79 80 $(window).on('load resize',function(){ 81 $(".tab-label-inner").each(function() { 82 var tabLabelWidth = $(this).parent().width(); 83 var tabLabelInnerWidth = 1; 84 for(var i = 0; i < $(this).find('li').length; i++){ 85 tabLabelInnerWidth += $(this).find('li').eq(i).width(); 86 } 87 $(this).css({'width':tabLabelInnerWidth}); 88 if (tabLabelWidth < tabLabelInnerWidth) { 89 $(this).parent().addClass("tab-overflow"); 90 } else { 91 $(this).parent().removeClass("tab-overflow"); 92 } 93 }); 94 }); 95 $(window).on('load',function(){ 96 $(".tab-label-inner>li:first-child").addClass('active'); 97 $(".tab-content>div:first-child").addClass('active'); 98 }); 99 $(".tab-label-inner a").click(function(e) { 100 e.preventDefault(); 101 var target = $(this).attr('href'); 102 if (! $(target).length) return false; 103 $('>li', $(this).closest('.tab-label-inner')).removeClass('active'); 104 $(this).closest('.tab-label-inner>li').addClass('active'); 105 $('>div', $(target).closest('.tab-content')).removeClass('active'); 106 $(target).addClass('active'); 107 }); 108}(jQuery); 109 110/** 111 * adjust 112 */ 113+function($) { 114 if($('.adjust').find('*').hasClass('adjust-content')) { 115 $(window).on('load resize',function(){ 116 var adjustCount = $(".adjust").length; 117 for (var i = 1 ; i <= adjustCount ; i++) { 118 var adjustSelector = '.adjust:eq(' + (i - 1) + ') .adjust-content'; 119 tallest = 0; 120 $(adjustSelector).each(function() { 121 $(this).css( "height", "" ); 122 thisHeight = $(this).height(); 123 if(thisHeight > tallest) { 124 tallest = thisHeight; 125 } 126 }); 127 $(adjustSelector).each(function() { $(this).height(tallest); }); 128 } 129 130 $('.adjust-invalid-xl').each(function() { 131 if (window.matchMedia('screen and (min-width: 1101px)').matches) { 132 $(this).find('*').css( "height", "" ); 133 } 134 }); 135 136 $('.adjust-invalid-lg').each(function() { 137 if (window.matchMedia('screen and (min-width: 768px) and (max-width: 1100px)').matches) { 138 $(this).find('*').css( "height", "" ); 139 } 140 }); 141 142 $('.adjust-invalid-md').each(function() { 143 if (window.matchMedia('screen and (min-width: 600px) and (max-width: 767px)').matches) { 144 $(this).find('*').css( "height", "" ); 145 } 146 }); 147 148 $('.adjust-invalid-sm').each(function() { 149 if (window.matchMedia('screen and (min-width: 415px) and (max-width: 599px)').matches) { 150 $(this).find('*').css( "height", "" ); 151 } 152 }); 153 154 $('.adjust-invalid-xs').each(function() { 155 if (window.matchMedia('screen and (max-width: 414px)').matches) { 156 $(this).find('*').css( "height", "" ); 157 } 158 }); 159 }); 160 } 161}(jQuery); 162 163/** 164 * post css 165 */ 166+function($) { 167 $(".entry-content img.alignnone").parent("p").prev("p").children("img.alignnone").parent("p").css("margin-bottom","0"); 168}(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.