1$(document).ready(function () { 2 3 // emergency container 4 var e = false; 5 $(".emergency-container").height("0px"); 6 $("#stickyopen").on('click', function (event) { 7 8 if ($(window).width() > 960) { 9 if (e === false) { 10 $(".emergency-container").animate({ 11 height: "400px" 12 }); 13 e = true; 14 } else { 15 $(".emergency-container").animate({ 16 height: "0px" 17 }); 18 e = false; 19 } 20 } 21 22 if ($(window).width() > 960) { 23 event.preventDefault(); 24 event.stopPropagation(); 25 26 // Stop event handling in IE 27 return false; 28 } 29 30 31 }); 32 $("#emergency .close-panel").click(function (e) { 33 e.preventDefault(); 34 $(".emergency-container").animate({ 35 height: "0px" 36 }); 37 38 }); 39 40 /* 41 //top link button 42 $('#top-link').topLink({ 43 min: 400, 44 fadeSpeed: 500 45 }); 46 //smoothscroll 47 /*$('#top-link').click(function (e) { 48 e.preventDefault(); 49 $(window).scrollTo(0, 300); 50 });*/ 51 52 // top scroll button 53 $(document).on('click', '.top-link', function () { 54 $("html, body").animate({ scrollTop: 0 }, "slow"); 55 console.log('top button clicked'); 56 $("#main-body").attr('tabindex', '0').focus(); 57 //return false; 58 }); 59 60 if ($("table.anchor-nav").get(0)) { 61 var targetID = ""; 62 var lcv = 1; 63 $('table.anchor-nav td').each(function () { 64 targetID = $(this).find('a').attr('href'); 65 if (!$(targetID).length) { 66 //$(this).addClass('disabled'); 67 $(this).addClass('disabled').find('a').contents().unwrap(); 68 $(this).attr('tabindex', 0); 69 $(this).attr('aria-label', 'No items in this category'); 70 } 71 lcv++; 72 }); 73 } 74 75 // anchor nav table 76 $(document).on('click', '.anchor-nav a', function () { 77 var theAnchorID = $(this).attr('href'); 78 //console.log(theAnchorID); 79 $('html,body').animate({ scrollTop: $(theAnchorID).offset().top }, 'slow'); 80 $(theAnchorID).focus(); 81 //console.log(theAnchorID + ' is focused'); 82 return false; 83 }); 84 85}); 86 87jQuery.fn.topLink = function (settings) { 88 settings = jQuery.extend({ 89 min: 1, 90 fadeSpeed: 200, 91 ieOffset: 50 92 }, settings); 93 return this.each(function () { 94 //listen for scroll 95 var el = $(this); 96 97 $(window).scroll(function () { 98 if (!jQuery.support.hrefNormalized) { 99 el.css({ 100 'position': 'absolute', 101 'top': $(window).scrollTop() + $(window).height() - settings.ieOffset 102 }); 103 } 104 if ($(window).scrollTop() >= settings.min) 105 { el.fadeIn(settings.fadeSpeed); } 106 else 107 { el.fadeOut(settings.fadeSpeed); } 108 }); 109 }); 110};
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.