1// JavaScript Document 2(function ($) { 3 4 "use strict"; 5 6 7 8 /*----------------------------------------------------*/ 9 /* Preloader 10 /*----------------------------------------------------*/ 11 $(window).on('load', function () { 12 var preloader = $('#loading'), 13 loader = preloader.find('#loading-center'); 14 loader.fadeOut(); 15 preloader.delay(400).fadeOut('slow'); 16 }); 17 18 /*----------------------------------------------------*/ 19 /* Navigtion Menu Scroll 20 /*----------------------------------------------------*/ 21 $(window).on('scroll', function () { 22 var b = $(window).scrollTop(); 23 24 if (b > 80) { 25 $(".wsmainfull").addClass("scroll"); 26 } else { 27 $(".wsmainfull").removeClass("scroll"); 28 } 29 30 }); 31 32 new WOW().init(); 33 34 35 /*----------------------------------------------------*/ 36 /* Mobile Menu Toggle 37 /*----------------------------------------------------*/ 38 39 if ($(window).outerWidth() < 992) { 40 $('.wsmenu-list li.nl-simple, .wsmegamenu li, .sub-menu li').on('click', function () { 41 $('body').removeClass("wsactive"); 42 $('.sub-menu').slideUp('slow'); 43 $('.wsmegamenu').slideUp('slow'); 44 $('.wsmenu-click').removeClass("ws-activearrow"); 45 $('.wsmenu-click02 > i').removeClass("wsmenu-rotate"); 46 }); 47 } 48 49 if ($(window).outerWidth() < 992) { 50 $('.wsanimated-arrow').on('click', function () { 51 $('.sub-menu').slideUp('slow'); 52 $('.wsmegamenu').slideUp('slow'); 53 $('.wsmenu-click').removeClass("ws-activearrow"); 54 $('.wsmenu-click02 > i').removeClass("wsmenu-rotate"); 55 }); 56 } 57 58 59 /*----------------------------------------------------*/ 60 /* Accordion 61 /*----------------------------------------------------*/ 62 63 $(".accordion > .accordion-item.is-active").children(".accordion-panel").slideDown(); 64 65 $(".accordion > .accordion-item").on('click', function () { 66 $(this).siblings(".accordion-item").removeClass("is-active").children(".accordion-panel").slideUp(); 67 $(this).toggleClass("is-active").children(".accordion-panel").slideToggle("ease-out"); 68 }); 69 70 71 /*----------------------------------------------------*/ 72 /* Tabs 73 /*----------------------------------------------------*/ 74 75 $('ul.tabs-1 li').on('click', function () { 76 var tab_id = $(this).attr('data-tab'); 77 78 $('ul.tabs-1 li').removeClass('current'); 79 $('.tab-content').removeClass('current'); 80 81 $(this).addClass('current'); 82 $("#" + tab_id).addClass('current'); 83 }); 84 85 86 /*----------------------------------------------------*/ 87 /* Single Image Lightbox 88 /*----------------------------------------------------*/ 89 90 $('.image-link').magnificPopup({ 91 type: 'image' 92 }); 93 94 95 /*----------------------------------------------------*/ 96 /* Video Link #2 Lightbox 97 /*----------------------------------------------------*/ 98 if ($('.video-popup2').length > 0) { 99 $('.video-popup2').magnificPopup({ 100 type: 'iframe', 101 disableOn: 200, 102 removalDelay: 160, 103 preloader: false, 104 fixedContentPos: false, 105 }); 106 } 107 108 109 /*----------------------------------------------------*/ 110 /* Statistic Counter 111 /*----------------------------------------------------*/ 112 113 $('.count-element').each(function () { 114 $(this).appear(function () { 115 $(this).prop('Counter', 0).animate({ 116 Counter: $(this).text() 117 }, { 118 duration: 4000, 119 easing: 'swing', 120 step: function (now) { 121 $(this).text(Math.ceil(now)); 122 } 123 }); 124 }, { accX: 0, accY: 0 }); 125 }); 126 127 128 /*----------------------------------------------------*/ 129 /* Testimonials Rotator 130 /*----------------------------------------------------*/ 131 132 var owl = $('.reviews-1-wrapper'); 133 owl.owlCarousel({ 134 items: 3, 135 loop: true, 136 autoplay: true, 137 navBy: 1, 138 autoplayTimeout: 4500, 139 autoplayHoverPause: true, 140 smartSpeed: 1500, 141 responsive: { 142 0: { 143 items: 1 144 }, 145 767: { 146 items: 1 147 }, 148 768: { 149 items: 2 150 }, 151 991: { 152 items: 3 153 }, 154 1000: { 155 items: 3 156 } 157 } 158 }); 159 160 161 /*----------------------------------------------------*/ 162 /* Brands Logo Rotator 163 /*----------------------------------------------------*/ 164 165 var owl = $('.brands-carousel-5'); 166 owl.owlCarousel({ 167 items: 6, 168 loop: true, 169 autoplay: true, 170 navBy: 1, 171 nav: false, 172 autoplayTimeout: 4000, 173 autoplayHoverPause: false, 174 smartSpeed: 2000, 175 responsive: { 176 0: { 177 items: 2 178 }, 179 550: { 180 items: 3 181 }, 182 767: { 183 items: 3 184 }, 185 768: { 186 items: 6 187 }, 188 991: { 189 items: 6 190 }, 191 1000: { 192 items: 6 193 } 194 } 195 }); 196 197 198 /*----------------------------------------------------*/ 199 /* Brands Logo Rotator 200 /*----------------------------------------------------*/ 201 202 var owl = $('.brands-carousel-6'); 203 owl.owlCarousel({ 204 items: 6, 205 loop: true, 206 autoplay: true, 207 navBy: 1, 208 nav: false, 209 autoplayTimeout: 4000, 210 autoplayHoverPause: false, 211 smartSpeed: 2000, 212 responsive: { 213 0: { 214 items: 2 215 }, 216 550: { 217 items: 3 218 }, 219 767: { 220 items: 3 221 }, 222 768: { 223 items: 5 224 }, 225 991: { 226 items: 6 227 }, 228 1000: { 229 items: 6 230 } 231 } 232 }); 233 234 235 /*----------------------------------------------------*/
236 /* Show Password 237 /*----------------------------------------------------*/ 238 239 var showPass = 0; 240 $('.btn-show-pass').on('click', function () { 241 if (showPass == 0) { 242 $(this).next('input').attr('type', 'text'); 243 $(this).find('span.eye-pass').removeClass('flaticon-visibility'); 244 $(this).find('span.eye-pass').addClass('flaticon-invisible'); 245 showPass = 1; 246 } 247 else { 248 $(this).next('input').attr('type', 'password'); 249 $(this).find('span.eye-pass').addClass('flaticon-visibility'); 250 $(this).find('span.eye-pass').removeClass('flaticon-invisible'); 251 showPass = 0; 252 } 253 254 }); 255 256 257 /*----------------------------------------------------*/ 258 /* Newsletter Subscribe Form 259 /*----------------------------------------------------*/ 260 261 $('.newsletter-form').ajaxChimp({ 262 language: 'cm', 263 url: 'https://jthemes.us3.list-manage.com/subscribe/post?u=af1a6c0b23340d7b339c085b4&id=344a494a6e' 264 //http://xxx.xxx.list-manage.com/subscribe/post?u=xxx&id=xxx 265 }); 266 267 $.ajaxChimp.translations.cm = { 268 'submit': 'Submitting...', 269 0: 'We have sent you a confirmation email', 270 1: 'Please enter your email address', 271 2: 'An email address must contain a single @', 272 3: 'The domain portion of the email address is invalid (the portion after the @: )', 273 4: 'The username portion of the email address is invalid (the portion before the @: )', 274 5: 'This email address looks fake or invalid. Please enter a real email address' 275 }; 276 277 // Dark light switch 278 $(".switch").click(function () { 279 $("body").toggleClass("theme--dark"); 280 if ($("body").hasClass("theme--dark")) { 281 $(".switch").text("Light Mode"); 282 } else { 283 $(".switch").text("Dark Mode"); 284 } 285 }); 286 287 if ($("body").hasClass("theme--dark")) { 288 $(".switch").text("Light Mode"); 289 } else { 290 $(".switch").text("Dark Mode"); 291 } 292 293 $('.modal').on('show.bs.modal', function (e) { 294 if ($(e.currentTarget).attr("data-popup")) { 295 $("body").addClass("body-scrollable"); 296 } 297 }); 298 $('.modal').on('hidden.bs.modal', function (e) { 299 $("body").removeClass("body-scrollable"); 300 }); 301 302 303 304 305 //progress Counter 306 $('#stlChanger').hover(function () { 307 $(this).toggleClass("open"); 308 }); 309 310 $(window).on('scroll', function () { 311 var b = $(window).scrollTop(); 312 313 if (b > 300) { 314 $(".progressCounter").removeClass("visually-hidden"); 315 } else { 316 $(".progressCounter").addClass("visually-hidden"); 317 } 318 319 }); 320 321 $(".progressCounter").progressScroll(); 322 $(".progressCounter").on("click", function () { 323 $("html, body").animate({ scrollTop: 0 }, "slow"); 324 return false; 325 }); 326 327 328 /* count control */ 329 $(document).on('click', '.count-control', function () { 330 var $quantity_input = $(this).closest('.quantity').find('.qty'); 331 var old = parseInt($quantity_input.val()); 332 if ($(this).hasClass('plus')) { 333 if (parseInt($quantity_input.attr('max')) != -1) { 334 if ((parseInt($quantity_input.attr('max')) - 1) >= old) { 335 $quantity_input.val(old + 1); 336 } 337 } else { 338 $quantity_input.val(old + 1); 339 } 340 341 } else { 342 if (old > 1) { 343 $quantity_input.val(old - 1); 344 } 345 } 346 347 $(this).closest('form').find('button[type="submit"]').prop('disabled', false); 348 return false; 349 }); 350 351 /*----------------------------------------------------*/ 352 /* Animated Scroll To Anchor 353 /*----------------------------------------------------*/ 354 355 $('.header a[href^="#"], .page a[href^="#"], .page a.internal-link[href^="#"]').on('click', function (e) { 356 e.preventDefault(); 357 358 var target = this.hash, 359 $target = jQuery(target); 360 361 if ($target.length > 0) { 362 363 if ($('.navbar-collapse').hasClass('show')) { 364 $('.navbar-toggler').trigger('click'); 365 } 366 367 console.log($target.offset()); 368 console.log($target.position()); 369 console.log(document.querySelector(this.hash).offsetHeight); 370 371 $('html, ' + target).stop().animate({ 372 'scrollTop': $target.offset().top - 60 // - 200px (nav-height) 373 }, 'slow', 'easeInSine', function () { 374 window.location.hash = target; 375 }); 376 } 377 378 }); 379 380}(jQuery)); 381 382function check() { 383 var checkBox = document.getElementById("checbox"); 384 var price1 = document.getElementsByClassName("price1"); 385 var price2 = document.getElementsByClassName("price2"); 386 387 for (var i = 0; i < price1.length; i++) { 388 if (checkBox.checked == true) { 389 price1[i].style.display = "block"; 390 price2[i].style.display = "none"; 391 } else { 392 price1[i].style.display = "none"; 393 price2[i].style.display = "block"; 394 } 395 } 396} 397check(); 398
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.