1$(function() { 2 3 $(function() { 4 var headerHight = 60; 5 $('a[href^="#"]').click(function(e) { 6 var href = $(this).attr("href"); 7 var target = $(href == "#" || href == "" ? 'html' : href); 8 var position = target.offset().top - headerHight; 9 $.when( 10 $("html, body").animate({ 11 scrollTop: position 12 }, 400, "swing"), 13 e.preventDefault(), 14 ).done(function() { 15 var diff = target.offset().top - headerHight; 16 if (diff === position) {} else { 17 $("html, body").animate({ 18 scrollTop: diff 19 }, 10, "swing"); 20 } 21 }); 22 }); 23 }); 24 25 //menu 26 $(".menu-trg-area, .menu-toggle").click(function () { 27 $(".menu-trigger").toggleClass("active"); 28 $(".gnav").toggleClass("active"); 29 }); 30 $(".gnav a").click(function () { 31 $(".menu-trigger").removeClass("active"); 32 $(".gnav").removeClass("active"); 33 }); 34 35});
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.