1(function ($) { 2 3 $(document).ready(function () { 4 5 /* 6 * Sticky navigation 7 */ 8 var $navigation = $('.navigation'); 9 10 if ($navigation.length) { 11 var navpos = $navigation.offset(); 12 13 $(window).on('scroll', function () { 14 if ($(window).scrollTop() > navpos.top) { 15 $navigation.addClass('navigation-fixed'); 16 } else { 17 $navigation.removeClass('navigation-fixed'); 18 } 19 }); 20 } 21 22 23 /* 24 * FAQs 25 */ 26 $('.faqs .faq-content').hide(); 27 28 $('.faqs .faq-title') 29 .hover( 30 function () { 31 $(this).addClass('hover'); 32 }, 33 function () { 34 $(this).removeClass('hover'); 35 } 36 ) 37 .on('click', function () { 38 $(this).next().slideToggle('normal'); 39 $('.faq-title').addClass('faq-active'); 40 }); 41 42 43 /* 44 * Testimonials 45 */ 46 $('.testimonials-category .testimonial-content').hide(); 47 48 $('.testimonials-category .title') 49 .hover( 50 function () { 51 $(this).addClass('hover'); 52 }, 53 function () { 54 $(this).removeClass('hover'); 55 } 56 ) 57 .on('click', function () { 58 $(this).next().slideToggle('normal'); 59 }); 60 61 62 /* 63 * Smooth scroll for on-page anchor links 64 */ 65 $('a[href*="#"]') 66 .not('[href="#"]') 67 .not('[href="#0"]') 68 .on('click', function (event) { 69 70 if ( 71 location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && 72 location.hostname === this.hostname 73 ) { 74 75 var target = $(this.hash); 76 77 target = target.length 78 ? target 79 : $('[name="' + this.hash.slice(1) + '"]'); 80 81 if (target.length) { 82 83 event.preventDefault(); 84 85 $('html, body').animate({ 86 scrollTop: target.offset().top 87 }, 1000, function () { 88 89 var $target = $(target); 90 91 $target.trigger('focus'); 92 93 if ($target.is(':focus')) { 94 return false; 95 } 96 97 $target.attr('tabindex', '-1'); 98 $target.trigger('focus'); 99 }); 100 } 101 } 102 }); 103 104 }); 105 106})(jQuery);// JavaScript Document
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.