1"use strict"; 2 3jQuery(document).ready(function($) { 4 5 6/* Toggle header search 7/* ------------------------------------ */ 8 $('.toggle-search').click(function(){ 9 $('.toggle-search').toggleClass('active'); 10 $('.search-expand').fadeToggle(250); 11 setTimeout(function(){ 12 $('.search-expand input').focus(); 13 }, 300); 14 }); 15 16/* Scroll to top 17/* ------------------------------------ */ 18 $('a#back-to-top').click(function() { 19 $('html, body').animate({scrollTop:0},'slow'); 20 return false; 21 }); 22 23/* Tabs widget 24/* ------------------------------------ */ 25 (function() { 26 var $tabsNav = $('.alx-tabs-nav'), 27 $tabsNavLis = $tabsNav.children('li'), 28 $tabsContainer = $('.alx-tabs-container'); 29 30 $tabsNav.each(function() { 31 var $this = $(this); 32 $this.next().children('.alx-tab').stop(true,true).hide() 33 .siblings( $this.find('a').attr('href') ).show(); 34 $this.children('li').first().addClass('active').stop(true,true).show(); 35 }); 36 37 $tabsNavLis.on('click', function(e) { 38 var $this = $(this); 39 40 $this.siblings().removeClass('active').end() 41 .addClass('active'); 42 43 $this.parent().next().children('.alx-tab').stop(true,true).hide() 44 .siblings( $this.find('a').attr('href') ).fadeIn(); 45 e.preventDefault(); 46 }).children( window.location.hash ? 'a[href=' + window.location.hash + ']' : 'a:first' ).trigger('click'); 47 48 })(); 49 50/* Comments / pingbacks tabs 51/* ------------------------------------ */ 52 $(".comment-tabs li").click(function() { 53 $(".comment-tabs li").removeClass('active'); 54 $(this).addClass("active"); 55 $(".comment-tab").hide(); 56 var selected_tab = $(this).find("a").attr("href"); 57 $(selected_tab).fadeIn(); 58 return false; 59 }); 60 61/* Table odd row class 62/* ------------------------------------ */ 63 $('table tr:odd').addClass('alt'); 64 65/* Sidebar collapse 66/* ------------------------------------ */ 67 $('body').addClass('s1-collapse'); 68 $('body').addClass('s2-collapse'); 69 70 $('.s1 .sidebar-toggle').click(function(){ 71 $('body').toggleClass('s1-collapse').toggleClass('s1-expand'); 72 if ($('body').is('.s2-expand')) { 73 $('body').toggleClass('s2-expand').toggleClass('s2-collapse'); 74 } 75 }); 76 $('.s2 .sidebar-toggle').click(function(){ 77 $('body').toggleClass('s2-collapse').toggleClass('s2-expand'); 78 if ($('body').is('.s1-expand')) { 79 $('body').toggleClass('s1-expand').toggleClass('s1-collapse'); 80 } 81 }); 82 83/* Dropdown menu animation 84/* ------------------------------------ */ 85 $('.nav ul.sub-menu').hide(); 86 $('.nav li').hover( 87 function() { 88 $(this).children('ul.sub-menu').slideDown('fast'); 89 }, 90 function() { 91 $(this).children('ul.sub-menu').hide(); 92 } 93 ); 94 95/* Mobile menu smooth toggle height 96/* ------------------------------------ */ 97 $('.nav-toggle').on('click', function() { 98 slide($('.nav-wrap .nav', $(this).parent())); 99 }); 100 101 function slide(content) { 102 var wrapper = content.parent(); 103 var contentHeight = content.outerHeight(true); 104 var wrapperHeight = wrapper.height(); 105 106 wrapper.toggleClass('expand'); 107 if (wrapper.hasClass('expand')) { 108 setTimeout(function() { 109 wrapper.addClass('transition').css('height', contentHeight); 110 }, 10); 111 } 112 else { 113 setTimeout(function() { 114 wrapper.css('height', wrapperHeight); 115 setTimeout(function() { 116 wrapper.addClass('transition').css('height', 0); 117 }, 10); 118 }, 10); 119 } 120 121 wrapper.one('transitionEnd webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd', function() { 122 if(wrapper.hasClass('open')) { 123 wrapper.removeClass('transition').css('height', 'auto'); 124 } 125 }); 126 } 127 128 $( ".entry-inner p" ).first().addClass( "first-para-dropcap" ); 129});
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.