1 2// MAIN JS theme file ===================================================================== 3 4jQuery(document).ready(function($) { 5 6 // Affix col 7 $('.affix-content').affix({ 8 offset: { 9 top: $('#masthead').height() 10 } 11 }); 12 13 $(".affix-content").on( 'affixed-top.bs.affix', function () { 14 $("body").removeClass( 'affix-fixed' ).addClass( 'affix-not-fixed' ); 15 $(".affix-holder").removeClass( 'visible' ).addClass( 'hidden' ); 16 } ); 17 $(".affix-content").on( 'affix.bs.affix', function () { 18 $("body").removeClass( 'affix-not-fixed' ).addClass( 'affix-fixed' ); 19 $(".affix-holder").removeClass( 'hidden' ).addClass( 'visible' ); 20 } ); 21 22 $(window).scroll(function() { 23 var footerHeight = $('#footer').height(); 24 if($(window).scrollTop() + $(window).height() > $(document).height() - footerHeight) { 25 // $(".affix-content").addClass( 'hidden' ); 26 $("#footer").css({"position": "relative", "z-index": "9999"}); 27 } else{ 28 $("#footer").css({"position": "relative", "z-index": "1"}); 29 } 30 }); 31 32 // Affix toggle 33 $('.affix-toggle').click(function(){ 34 $('.em-search-wrapper').toggleClass("hidden-sm hidden-xs"); 35 // $('.em-search-wrapper').css({"height": "0px", "overflow": "hidden"}); 36 }); 37 38 // Select color change 39 $('.em-events-search .custom-select').on('change', function() { 40 var $self = $(this); 41 $self.find("option:selected").each(function() { 42 if ($(this).val() > 0) { 43 $self.addClass("modified"); 44 } 45 else{ 46 $self.removeClass("modified"); 47 } 48 }); 49 }); 50 51 // Init match autheight 52 $('.item-height').matchHeight(); 53 54 // Show Youtube and Vimeo vids nicely. 55 $("#thing-with-videos").fitVids(); 56 57 // Initialize tooltip 58 $('body').tooltip({ 59 selector: '[rel=tooltip]', 60 container: 'body' 61 }); 62 63 // Highlight first word 64 $('.entry-date, .site-content .widget-title, .event-date, .double-text').each(function() { 65 var word = $(this).html(); 66 var index = word.indexOf(' '); 67 if(index === -1) { 68 index = word.length; 69 } 70 $(this).html('<span class="first-word dis-b">' + word.substring(0, index) + ' </span>' + word.substring(index, word.length)); 71 }); 72 73 // Check to see if the window is top if not then display button 74 $(window).scroll(function(){ 75 if ($(this).scrollTop() > 600) { 76 $('.scroll-top').show(); 77 } else { 78 $('.scroll-top').fadeOut('fast'); 79 } 80 }); 81 82 // Click event to scroll to top 83 $('.scroll-top').click(function(){ 84 $('html, body').animate({scrollTop : 0},700); 85 return false; 86 }); 87 88 // Scroll to section 89 $('#accordion').on('shown.bs.collapse', function () { 90 var panel = $(this).find('.in'); 91 $('html, body').animate({ 92 scrollTop: panel.offset().top - 70 93 }, 500); 94 }); 95 96});
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.