1$(function($) { 2 // 3 $(document).on('click', '[data-href]', function() { 4 window.location = $(this).attr('data-href'); 5 }); 6 7 $(document).on('click', '[data-href-blank]', function() { 8 window.open().location = $(this).attr('data-href-blank'); 9 }); 10 11 // 12 var topBtn = $('#goto_pagetop'); 13 $(window).on("scroll", function(){ 14 if ($(this).scrollTop() > 1000) { 15 topBtn.stop().animate({right:"0px"}); 16 } else { 17 topBtn.stop().animate({right:"-50px"}); 18 } 19 }); 20 21 // 22 $('a[href^="#"]').on("click", function() { 23 /* 24 if (window.innerWidth > 559) { 25 var nav_height = $("#nav").height(); 26 } else { 27 var nav_height = 0; 28 } 29 */ 30 var nav_height = 0; 31 32 var href = $(this).attr("href"); 33 var target = $(href == "#" || href == "" ? 'html' : href); 34 var position = target.offset().top - nav_height; 35 $('body,html').animate({scrollTop:position}, 1000, 'swing'); 36 37 if($("#drawer").hasClass("active")){ 38 $("#drawer").removeClass("active"); 39 $("#drawer").fadeOut(); 40 $("#nav_opener").removeClass("active"); 41 } 42 43 return false; 44 }); 45 46 // change language 47 $("header #language").hover( 48 function () { 49 $(this).find("ul").stop(true, true).fadeIn("slow"); 50 }, 51 function () { 52 $(this).find("ul").stop(true, true).fadeOut("slow"); 53 } 54 ); 55 56 /* 57 // slider.js 58 $(window).on("load resize", function() { 59 if (window.innerWidth > 560) { 60 //} elseif (window.innerWidth > 768) { 61 } else { 62 var controller = new slidebars(); 63 controller.init(); 64 $(".sb").on("click", function ( event ) { 65 event.preventDefault(); 66 event.stopPropagation(); 67 controller.toggle("sb"); 68 }); 69 $( controller.events ).on("opened", function () { 70 $('[canvas="container"]').addClass("close-any-slidebar"); 71 } ); 72 $( controller.events ).on("closed", function () { 73 $('[canvas="container"]').removeClass("close-any-slidebar"); 74 } ); 75 $("body").on("click", ".close-any-slidebar", function ( event ) { 76 event.stopPropagation(); 77 controller.close(); 78 }); 79 } 80 }); 81 */ 82 83 // 84 //$(window).on("load", function() { 85 if (window.innerWidth < 560) { 86 $("#nav_opener").on("click", function(){ 87 //$(document).on("click", "#nav_opener", function(){ 88 $(this).toggleClass("active"); 89 $("#drawer").toggleClass("active").stop(true, false).fadeToggle(); 90 }); 91 } 92 //}); 93 94 $(document).on("click", function(event){ 95 if(!$(event.target).closest("#nav_opener").length) { 96 if($("#drawer").hasClass("active")){ 97 $("#drawer").removeClass("active").fadeOut(); 98 $("#nav_opener").removeClass("active"); 99 } 100 } 101 }); 102 103});
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.