1jQuery( document ).ready( function () { 2 jQuery( '#scroll-up' ).hide(); 3 jQuery( function () { 4 jQuery( window ).scroll( function () { 5 if ( jQuery( this ).scrollTop() > 1000 ) { 6 jQuery( '#scroll-up').fadeIn(); 7 } else { 8 jQuery( '#scroll-up' ).fadeOut(); 9 } 10 }); 11 jQuery( 'a#scroll-up' ).click( function () { 12 jQuery( 'body, html' ).animate({ 13 scrollTop: 0 14 }, 800 ); 15 return false; 16 }); 17 }); 18 19 /** 20 * Responsive menu with toggle 21 */ 22 jQuery('.better-responsive-menu .menu-primary-container .menu-item-has-children'). 23 append('<span class="sub-toggle"> <span class="fa fa-caret-right"></span> </span>'); 24 25 jQuery('.better-responsive-menu .menu-primary-container .sub-toggle').click(function() { 26 jQuery(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000'); 27 jQuery(this).children('.sub-toggle .fa').first().toggleClass('fa-caret-down fa-caret-right'); 28 }); 29 30 /** 31 * Search 32 */ 33 var hideSearchForm = function() { 34 jQuery( '.header-search-form' ).removeClass( 'show' ); 35 }; 36 37 // On Search icon click. 38 jQuery( '#header-right-section .search, .bottom-menu .search' ).click( function () { 39 jQuery( this ).next( '.header-search-form' ).toggleClass( 'show' ); 40 41 // focus after some time to fix conflict with toggleClass 42 setTimeout( function () { 43 jQuery( '.header-search-form.show input' ).focus(); 44 }, 200 ); 45 46 // For esc key press. 47 jQuery( document ).on( 'keyup', function ( e ) { 48 49 // on esc key press. 50 if ( 27 === e.keyCode ) { 51 // if search box is opened 52 if ( jQuery( '.header-search-form' ).hasClass( 'show' ) ) { 53 hideSearchForm(); 54 } 55 56 } 57 } ); 58 59 jQuery( document ).on( 'click.outEvent', function( e ) { 60 if ( e.target.closest( '.search-wrapper' ) ) { 61 return; 62 } 63 64 hideSearchForm(); 65 66 // Unbind current click event. 67 jQuery( document ).off( 'click.outEvent' ); 68 } ); 69 70 } ); 71}); 72 73/** 74 * Slider Setting 75 * 76 * Contains all the slider settings for the featured post/page slider. 77 */ 78jQuery(window).on('load',function() { 79 if ( typeof jQuery.fn.cycle !== 'undefined' ) { 80 jQuery( '.slider-cycle' ).cycle( { 81 fx : 'fade', 82 timeout : 4000, 83 speed : 1000, 84 slides : '> div', 85 pager : '> #controllers', 86 pagerActiveClass : 'active', 87 pagerTemplate : '<a></a>', 88 pauseOnHover : true, 89 autoHeight : 'container', 90 swipe : true, 91 swipeFx : 'scrollHorz', 92 log : false 93 } ); 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.