1jQuery(document).ready(function($){ 2 // Trimming white space 3 $('p').filter(function () { return $.trim(this.innerHTML) == "" }).remove(); 4 // Without trimming white space 5 $('p').filter(function () { return this.innerHTML == "" }).remove(); 6 7 // If header is fixed, add padding and shrink 8 function fixedMenu() { 9 var fixedHeader = $('#masthead.fixed'); 10 var elementToMove = $('#page-content'); 11 elementToMove.css('padding-top', fixedHeader.outerHeight()); 12 13 var headerHeight = $('.site-branding'); 14 var topDistance = $(fixedHeader).outerHeight(); 15 topDistance = topDistance-150; 16 17 if ($(document).scrollTop() > topDistance) { 18 fixedHeader.addClass('shrink'); 19 } 20 $(window).scroll(function() { 21 if ($(document).scrollTop() > topDistance) { 22 fixedHeader.addClass('shrink'); 23 } 24 else { 25 fixedHeader.removeClass('shrink'); 26 } 27 }); 28 } 29 fixedMenu(); 30 31 // MixItUp 32 if($('#posts').length) { 33 var mixer = mixitup('#posts', { 34 selectors: { 35 control: '[data-mixitup-control]' 36 } 37 }); 38 } 39 40 // this make it possible to link to an specific category (url.com/#category) on an archive with MixItUp 41 if (location.hash) { 42 var hash = location.hash.replace('#', '.') 43 mixer.filter(hash) 44 } 45 46 // adding bootstrap classes around tables on "page-content-block" block 47 $("table",".page-content-block").wrapAll('<div class="table-responsive"></div>').addClass('table'); 48 49 50 // Check if it is IE or EDGE --> replace the image that is using object fit 51 if (document.documentMode || /Edge/.test(navigator.userAgent)) { 52 jQuery('img').each(function(){ 53 var t = jQuery(this), 54 s = 'url(' + t.attr('src') + ')', 55 p = t.parent(), 56 d = jQuery('<div></div>'); 57 58 t.css("cssText", "display: none !important;"); 59 p.append(d); 60 d.css({ 61 //'height' : t.parent().css('height'), 62 'height' : '100%', 63 'background-size' : 'cover', 64 'background-repeat' : 'no-repeat', 65 'background-position' : '50% 50%', 66 'background-image' : s 67 }); 68 t.hide(); 69 }); 70 } 71 72 $(window).scroll(function() { 73 if ($(this).scrollTop() >= 50) { // If page is scrolled more than 50px 74 $('#return-to-top').fadeIn(200).css("display", "flex"); // Fade in the arrow 75 76 } else { 77 $('#return-to-top').fadeOut(200); // Else fade out the arrow 78 } 79 }); 80 $('#return-to-top').click(function() { // When arrow is clicked 81 $('body,html').animate({ 82 scrollTop : 0 // Scroll to top of body 83 }, 500); 84 }); 85 86});
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.