1MAIN = { 2 3 init : function () { 4 5 // Mobile Menu 6 $('.navbar-toggle.collapsed').click(function () { 7 8 if ($(this).hasClass('collapsed')) { 9 10 $('#header').addClass('menu-open'); 11 12 } else { 13 14 setTimeout(function () { 15 16 $('#header').removeClass('menu-open'); 17 18 }, 500); 19 20 } 21 22 }); 23 24 // Sticky Header 25 /*$(window).scroll(function() { 26 if ($(this).scrollTop() > 0) { 27 28 $('#header').addClass('sticky'); 29 30 } else { 31 32 $('#header').removeClass('sticky'); 33 34 } 35 }); 36 */ 37 38 // Carousel 39 $('.owl-carousel').owlCarousel({ 40 loop:true, 41 margin:30, 42 nav:false, 43 responsive:{ 44 0:{ 45 items:1 46 }, 47 600:{ 48 items:2 49 }, 50 1000:{ 51 items:3 52 } 53 } 54 }); 55 56 var owl = $('.owl-carousel'); 57 58 $('.owl-custom-next').click(function() { 59 owl.trigger('next.owl.carousel'); 60 }); 61 62 $('.owl-custom-prev').click(function() { 63 owl.trigger('prev.owl.carousel'); 64 }); 65 66 } 67} 68 69 70$(document).ready(function () { 71 72 //Initialize tooltips 73 $('[data-toggle="tooltip"]').tooltip(); 74 $('.nav-tabs > li a[title]').tooltip(); 75 76 $('.footer-widget h5').click(function(){ 77 $(this).parent('.footer-widget').children('ul').stop().slideToggle(); 78 }); 79 80 $('.list-location > li').hover( 81 function() { 82 $('.list-location > li').removeClass('active'); 83 $(this).addClass('active'); 84 85 if($(this).hasClass('active')){ 86 87 $(this).children('.list-neighbor').addClass('active'); 88 89 } else { 90 91 $('.list-neighbor').removeClass('active'); 92 93 } 94 } 95 ); 96 97 $('#header-tabs > li > a').hover(function() { 98 $(this).tab('show'); 99 $('.list-location > li').removeClass('active'); 100 101 if($('.tab-pane').hasClass('active')) { 102 $('.list-location > li:first-child').addClass('active'); 103 } 104 105 }); 106 107 108 // Mobile Detect 109 var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); 110 111 if (isMobile) { 112 113 $('#header-tabs li a').click(function(){ 114 return false; 115 }); 116 $('#header li.dropdown a').on('click', function(e){ 117 e.stopPropagation(); 118 e.preventDefault(); 119 const target = $(this).attr('href'); 120 const parent = $(this).parent('.dropdown'); 121 const navbar = $(this).parent('.navbar-collapse'); 122 window.location.href = target; 123 setTimeout(() => { 124 parent.find('.dropdown-menu').removeClass('open'); 125 navbar.addClass('collapse'); 126 }, 50); 127 }); 128 $('#header .navbar-default .dropdown-menu.custom-dd li .tab-content .tab-pane .list-location li').on('click', function(){ 129 return false; 130 }); 131 132 $('.navbar-toggle').click(function(){ 133 134 if($('#header').hasClass('menu-open')){ 135 $('body').css({'overflow':'auto'}); 136 } else { 137 $('body').css({'overflow':'hidden'}); 138 } 139 140 }); 141 142 $('#header .navbar-default .dropdown-menu.custom-dd li .tab-content .tab-pane .list-location li .list-neighbor li a').on('click', function(e){ 143 e.stopPropagation(); 144 }); 145 146 147 148 } 149 150 151}); 152 153 154$(function () { 155 156 MAIN.init(); 157 158}); 159 160
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.