1( function( $ ) { 2 "use strict"; 3 4 // Set Fixed Header 5 var $cloneHeader = $('.main-header').clone().removeClass('main-header-original').addClass('main-header-clone').appendTo('body'); 6 $(window).on('load scroll', function() { 7 var value = $(this).scrollTop(); 8 if ( value > 300 ) { 9 $cloneHeader.addClass('main-header-clone-show'); 10 } else { 11 $cloneHeader.removeClass('main-header-clone-show'); 12 $('.main-header').removeClass('drawer-opened'); 13 } 14 } ); 15 16 // Set Drawer Menu 17 $('.drawer-hamburger').on('click', function() { 18 $(this).parent().parent().toggleClass('drawer-opened'); 19 } ); 20 $('.drawer-overlay').on('click',function() { 21 $('.main-header').removeClass('drawer-opened'); 22 } ); 23 24 // Set Smooth Scroll 25 $('a[href^=#]').click(function() { 26 var headerHight = $('.main-header-clone').outerHeight()+45; 27 var href = $(this).attr('href'); 28 var target = $(href == '#' || href == '' ? 'html' : href); 29 var position = target.offset().top-headerHight; 30 $('html,body').animate({scrollTop:position}, 400, 'swing'); 31 } ); 32 33 // Set Back to Top 34 $(function() { 35 $(window).scroll(function () { 36 if ($(this).scrollTop() > 300) { 37 $('.back-to-top').fadeIn(); 38 } else { 39 $('.back-to-top').fadeOut(); 40 } 41 }); 42 $('.back-to-top').click(function () { 43 $('html,body').animate({scrollTop: 0}, 600, 'swing'); 44 return false; 45 }); 46 }); 47 48 // Set Slick for Featured Posts. 49 if( 1 < $('.slick-item').length ) { 50 $('.featured-post').slick( { 51 centerMode: true, 52 centerPadding: '0', 53 dots: true, 54 mobileFirst: true, 55 slidesToShow: 1, 56 } ); 57 } 58 59 // Set Stickyfill for Sticky Sidebar. 60 var $sticky_sidebar = $('#sticky-sidebar'); 61 if( 0 < $sticky_sidebar.length ) { 62 Stickyfill.add($sticky_sidebar); 63 } 64 65 // Set Fitvids 66 $('.entry-content').fitVids(); 67 68} )( 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.