1jQuery(document).ready(function($) { 2 3 // grab the initial top offset of the navigation 4 var freshwpstickyNavTop = $('.freshwp-menu-outer-container').offset().top; 5 6 // our function that decides weather the navigation bar should have "fixed" css position or not. 7 var freshwpstickyNav = function(){ 8 var freshwpscrollTop = $(window).scrollTop(); // our current vertical position from the top 9 10 // if we've scrolled more than the navigation, change its position to fixed to stick to top, 11 // otherwise change it back to relative 12 if (freshwpscrollTop > freshwpstickyNavTop) { 13 $('.freshwp-menu-outer-container').addClass('freshwp-fixed'); 14 } else { 15 $('.freshwp-menu-outer-container').removeClass('freshwp-fixed'); 16 } 17 }; 18 19 freshwpstickyNav(); 20 // and run it again every time you scroll 21 $(window).scroll(function() { 22 freshwpstickyNav(); 23 }); 24 25 $(".freshwp-nav-primary .freshwp-nav-menu").addClass("responsive-menu").before('<div class="freshwp-responsive-menu-icon"></div>'); 26 27 $(".freshwp-responsive-menu-icon").click(function(){ 28 $(this).next(".freshwp-nav-primary .freshwp-nav-menu").slideToggle(); 29 }); 30 31 $(window).resize(function(){ 32 if(window.innerWidth > 1076) { 33 $(".freshwp-nav-primary .freshwp-nav-menu, nav .sub-menu, nav .children").removeAttr("style"); 34 $(".responsive-menu > li").removeClass("menu-open"); 35 } 36 }); 37 38 $(".responsive-menu > li").click(function(event){ 39 if (event.target !== this) 40 return; 41 $(this).find(".sub-menu:first").slideToggle(function() { 42 $(this).parent().toggleClass("menu-open"); 43 }); 44 $(this).find(".children:first").slideToggle(function() { 45 $(this).parent().toggleClass("menu-open"); 46 }); 47 }); 48 49 $("div.freshwp-responsive-menu > ul > li").click(function(event) { 50 if (event.target !== this) 51 return; 52 $(this).find("ul:first").slideToggle(function() { 53 $(this).parent().toggleClass("menu-open"); 54 }); 55 }); 56 57 $(".post").fitVids(); 58 59 $( 'body' ).prepend( '<div class="freshwp-scroll-top"></div>'); 60 var scrollButtonEl = $( '.freshwp-scroll-top' ); 61 scrollButtonEl.hide(); 62 63 $( window ).scroll( function () { 64 if ( $( window ).scrollTop() < 20 ) { 65 $( '.freshwp-scroll-top' ).fadeOut(); 66 } else { 67 $( '.freshwp-scroll-top' ).fadeIn(); 68 } 69 } ); 70 71 scrollButtonEl.click( function () { 72 $( "html, body" ).animate( { scrollTop: 0 }, 300 ); 73 return false; 74 } ); 75 76 $('.freshwp-main-wrapper, .freshwp-sidebar-one-wrapper, .freshwp-sidebar-two-wrapper').theiaStickySidebar({ 77 containerSelector: ".freshwp-content-inner-wrapper", 78 additionalMarginTop: 0, 79 additionalMarginBottom: 0, 80 minWidth: 1107, 81 }); 82 83});
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.