1jQuery(document).ready(function($) { 2 3 // rel="external" 4 $('a[rel="external"]').click( function() { 5 window.open( $(this).attr('href') ); 6 return false; 7 }); 8 9 // Smooth Scroll 10 $('.smooth').smoothScroll(); 11 12 13 // Menu Toggle 14 $('#toggle').click(function(){ 15 $('header, nav, #page').toggleClass('open'); 16 return false; 17 }); 18 19 // Header, Nav, #page Toggle 20 $('#page').on('click', function(){ 21 $('header, nav, #page').removeClass('open'); 22 }); 23 24 25 26 // Subscribe Trigger 27 $('.subscribe-trigger').click(function(){ 28 $('body').toggleClass('subscribe-open'); 29 return false; 30 }); 31 32 33 // Subscribe Close 34 $('.subscribe-close').click(function(){ 35 $('body').toggleClass('subscribe-open'); 36 return false; 37 }); 38 39 40 // Search Trigger 41 $('.search-trigger').click(function(){ 42 $('body').toggleClass('search-open'); 43 return false; 44 }); 45 46 47 // Search Close 48 $('.search-close').click(function(){ 49 $('body').toggleClass('search-open'); 50 return false; 51 }); 52 53 54 55 // Homepage Carousel 56 $('.page-template-homepage .featured-articles-carousel').slick({ 57 dots: true, 58 arrows: false, 59 infinite: true, 60 speed: 500, 61 autoplay: true, 62 autoplaySpeed: 6000, 63 slidesToShow: 1, 64 slidesToScroll: 1, 65 customPaging : function(slider, i) { 66 var thumb = $(slider.$slides[i]).data('thumb'); 67 return '<a><img src="'+thumb+'"></a>'; 68 }, 69 70 }); 71 72 73 // New User Popup 74 var showPopup = localStorage.getItem('showPopup'); 75 if (showPopup == null) { 76 localStorage.setItem('showPopup', 1); 77 78 // Show popup here 79 $('#new-user').fadeIn('slow'); 80 } 81 82 $('.new-user-close-btn').on('click', function(){ 83 $('#new-user').fadeOut('slow'); 84 return false; 85 }); 86 87 88 89 $('.combo-box select').on('change', function () { 90 var url = $(this).val(); 91 if (url) { 92 window.location = url; 93 } 94 return false; 95 }); 96 97 98 99 100}); 101 102window.almComplete = function(alm){ 103 104 jQuery('.show-more-btn .btn').on('click', function(){ 105 var article = jQuery(this).closest('section.body'); 106 jQuery(article).addClass('expanded'); 107 108 return false; 109 }); 110}; 111 112 113jQuery(document).keyup(function(e) { 114 115 if (e.keyCode == 27) { 116 jQuery('header, nav, #page').removeClass('open'); 117 } 118 119});
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.