1jQuery(document).ready(function($){'use strict'; 2 3 // Sticky Nav 4 $(window).on('scroll', function(){ 5 if ( $(window).scrollTop() > 100 ) { 6 $('.thw-menubar').addClass('sticky-header'); 7 } else { 8 $('.thw-menubar').removeClass('sticky-header'); 9 } 10 }); 11 12 /* ----------------------------------------------------------- */ 13 /* Title 14 /* ----------------------------------------------------------- */ 15 jQuery('h3.widget_title').each(function() { 16 var txt = jQuery(this).html(); 17 var index = txt.indexOf(' '); 18 if (index == -1) { 19 index = txt.length; 20 } 21 jQuery(this).html('<span>' + txt.substring(0, index) + '</span>' + txt.substring(index, txt.length)); 22 }); 23 24 25 // Search 26 $('.icon-search-btn').on('click', function(event) { 27 event.preventDefault(); 28 var $sitesearch = $('.site-search'); 29 if ($sitesearch.hasClass('show')) { 30 $sitesearch.removeClass('show'); 31 $sitesearch.fadeOut('fast'); 32 }else{ 33 $sitesearch.addClass('show'); 34 $sitesearch.fadeIn('slow'); 35 } 36 }); 37 38 $('.icon-search-btn-close').on('click', function(event) { 39 event.preventDefault(); 40 41 var $sitesearch = $('.site-search'); 42 $sitesearch.removeClass('show'); 43 $sitesearch.fadeOut('fast'); 44 }); 45 46 47 48 /* ----------------------------------------------------------- */ 49 /* Back to top 50 /* ----------------------------------------------------------- */ 51 52 $(window).scroll(function () { 53 if ($(this).scrollTop() > 50) { 54 $('#back-to-top').fadeIn(); 55 } else { 56 $('#back-to-top').fadeOut(); 57 } 58 }); 59 // scroll body to 0px on click 60 $('#back-to-top').click(function () { 61 $('#back-to-top').tooltip('hide'); 62 $('body,html').animate({ 63 scrollTop: 0 64 }, 800); 65 return false; 66 }); 67 68 $('#back-to-top').tooltip('hide'); 69 $('.nano').nanoScroller(); 70 71 /* HEADER TRIGGER HANDLER */ 72 $("#header-trigger").click(function(){ 73 var body = $('body'); 74 if (body.hasClass('display-header')) 75 { 76 body.removeClass('display-header'); 77 } else { 78 body.addClass('display-header'); 79 } 80 }); 81 82 /* ----------------------------------------------------------- */ 83 /* Sticky Sidebar 84 /* ----------------------------------------------------------- */ 85 jQuery('.stickys').theiaStickySidebar(); 86 87 88});
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.