1/* 2Author : Hash Theme. 3Template Name: Kidzton - Responsive School Template 4Version : 1.0 5*/ 6 7/*============================================= 8TABLE OF CONTENTS 9================================================ 10 1101. PRELOADER JS 1202. JQUERY STICKY MENU 1303. MENU JS 1404. SECTIONS BACKGROUNDS 1505. BOOTSTRAP TOOLTIP 1606. HOME SLIDER JS 1707. TEAM SLIDER JS 1808. TESTIMONIAL SLIDER JS 1909. BLOG SLIDER JS 2010. SERVICE SLIDER JS 2111. BLOG GALLERY SLIDER JS 2212. CLIENT SLIDER JS 2313. CLASSES SLIDER JS 2414. COUNTER SECTION JS 2515. ACCORDION JS 2616. PORTFOLIO JS 2717. VENOBOX JS 2818. TIMER JS 2919. COPYRIGHT JS 3020. IMAGE ZOOM JS 3121. WOW JS 32 33Table Of Contents end 34================================================ 35*/ 36 37(function ($) { 38 "use strict"; 39 40 jQuery(document).on("ready", function () { 41 /* 01. PRELOADER JS */ 42 $(window).on("load", function () { 43 function fadeOut(el) { 44 el.style.opacity = 0.4; 45 var last; 46 var tick = function () { 47 el.style.opacity = +el.style.opacity - (new Date() - last) / 600; 48 last = +new Date(); 49 if (+el.style.opacity > 0) { 50 (window.requestAnimationFrame && requestAnimationFrame(tick)) || 51 setTimeout(tick, 100); 52 } else { 53 el.style.display = "none"; 54 } 55 }; 56 tick(); 57 } 58 var pagePreloaderId = document.getElementById("page-preloader"); 59 setTimeout(function () { 60 fadeOut(pagePreloaderId); 61 }, 500); 62 }); 63 64 /* 02. JQUERY STICKY MENU */ 65 $(".sticky-menu").sticky({ 66 topSpacing: 0, 67 zIndex: 999, 68 }); 69 70 $(".toppers").owlCarousel({ 71 loop: true, 72 margin: 10, 73 dots: true, 74 autoplay: true, 75 autoplayTimeout: 3000, 76 autoplayHoverPause: true, 77 responsiveClass: true, 78 responsive: { 79 0: { 80 items: 1, // Mobile 81 }, 82 600: { 83 items: 2, // Tablet 84 }, 85 1000: { 86 items: 4, // Desktop 87 }, 88 }, 89 }); 90 91 loadData("parent_feedback_section", "parent-slides", 2000).done(function (data) { 92 $(".feedback").owlCarousel({ 93 loop: true, 94 margin: 10, 95 dots: true, 96 autoplay: true, 97 autoplayTimeout: 5000, 98 autoplayHoverPause: true, 99 responsiveClass: true, 100 responsive: { 101 0: { 102 items: 1, // Mobile 103 }, 104 600: { 105 items: 2, // Tablet 106 }, 107 1000: { 108 items: 3, // Desktop 109 }, 110 }, 111 }); 112 }); 113 114 /* 03. MENU JS */ 115 $("nav.navbar").meanmenu({ 116 meanMenuContainer: ".mainmenu-area", 117 meanScreenWidth: "991", 118 }); 119 120 $(window).on("scroll", function () { 121 if ($(this).scrollTop() > 200) { 122 $(".mainmenu-area").addClass("menu-animation"); 123 } else { 124 $(".mainmenu-area").removeClass("menu-animation"); 125 } 126 }); 127 128 $("a.js-scroll-trigger").on("click", function (e) { 129 var anchor = $(this); 130 $("html, body") 131 .stop() 132 .animate( 133 { 134 scrollTop: $(anchor.attr("href")).offset().top - 48, 135 }, 136 1000 137 ); 138 e.preventDefault(); 139 }); 140 141 // Activate scrollspy to add active class to navbar items on scroll 142 $("body").scrollspy({ 143 target: ".mainmenu-area", 144 offset: 84, 145 }); 146 147 /* 04. SECTIONS BACKGROUNDS */ 148 var pageSection = $("section,div"); 149 pageSection.each(function (indx) { 150 if ($(this).attr("data-background")) { 151 $(this).css( 152 "background-image", 153 "url(" + $(this).data("background") + ")" 154 ); 155 } 156 }); 157 158 /* 05. BOOTSTRAP TOOLTIP */ 159 $('[data-toggle="tooltip"]').tooltip(); 160 161 /* 06. HOME SLIDER JS */ 162 $(".home-slides").owlCarousel({ 163 loop: true, 164 autoplay: false, 165 autoplayTimeout: 4000, 166 dots: true, 167 nav: true, 168 navText: [ 169 "<i class='icofont-simple-left'></i>", 170 "<i class='icofont-simple-right'></i>", 171 ], 172 responsiveClass: true, 173 responsive: { 174 0: { 175 items: 1, 176 nav: false, 177 }, 178 600: { 179 items: 1, 180 nav: false, 181 }, 182 768: { 183 items: 1, 184 nav: true, 185 }, 186 1000: { 187 items: 1, 188 nav: true, 189 }, 190 }, 191 }); 192 193 /* 07. TEAM SLIDER JS */
194 loadData("teacher_section", "team-slides", 2000).done(function (data) { 195 $(".team-slides").owlCarousel({ 196 items: 4, 197 margin: 30, 198 loop: true, 199 autoplay: false, 200 autoplayTimeout: 4000, 201 nav: false, 202 navText: [ 203 "<i class='icofont-long-arrow-left'></i>", 204 "<i class='icofont-long-arrow-right'></i>", 205 ], 206 dots: true, 207 responsiveClass: true, 208 responsive: { 209 0: { 210 items: 1, 211 }, 212 600: { 213 items: 1, 214 }, 215 768: { 216 items: 3, 217 }, 218 1000: { 219 items: 4, 220 }, 221 }, 222 }); 223 }); 224 225 226 227 loadData("events-list", "events-list", 3000).done(function (data) { 228 console.log("done"); 229 }); 230 231 loadData("notice-board", "notice-board", 3000).done(function (data) { 232 console.log("done"); 233 }); 234 235 /* 236 loadData("birthday-board", "birthday-board", 3000).done(function (data) { 237 console.log("done"); 238 }); 239 */ 240 241 loadData("birthday-board", "birthday-slides", 2000).done(function (data) { 242 $(".birthday").owlCarousel({ 243 items: 1, 244 loop: true, 245 margin: 10, 246 dots: true, 247 autoplay: true, 248 autoplayTimeout: 5000, 249 autoplayHoverPause: true, 250 responsiveClass: true, 251 responsive: { 252 0: { 253 items: 1, 254 }, 255 600: { 256 items: 1, 257 }, 258 768: { 259 items: 1, 260 }, 261 1000: { 262 items: 1, 263 }, 264 }, 265 }); 266 }); 267 268 269 $(".toppers-slides").owlCarousel({ 270 items: 4, 271 margin: 30, 272 loop: true, 273 autoplay: false, 274 autoplayTimeout: 4000, 275 nav: false, 276 navText: [ 277 "<i class='icofont-long-arrow-left'></i>", 278 "<i class='icofont-long-arrow-right'></i>", 279 ], 280 dots: true, 281 responsiveClass: true, 282 responsive: { 283 0: { 284 items: 1, 285 }, 286 600: { 287 items: 1, 288 }, 289 768: { 290 items: 3, 291 }, 292 1000: { 293 items: 4, 294 }, 295 }, 296 }); 297 298 /* 08. TESTIMONIAL SLIDER JS */ 299 $(".testimonial-wrapper").owlCarousel({ 300 loop: true, 301 margin: 0, 302 autoplay: false, 303 animateIn: "fadeInDown", 304 animateOut: "fadeOutDown", 305 nav: false, 306 navText: [ 307 "<i class='icofont-long-arrow-left'></i>", 308 "<i class='icofont-long-arrow-right'></i>", 309 ], 310 autoHeight: true, 311 dots: true, 312 dotsData: true, 313 responsive: { 314 0: { 315 items: 1, 316 }, 317 600: { 318 items: 1, 319 }, 320 1000: { 321 items: 1, 322 }, 323 }, 324 }); 325 326 var owltestimonial = $(".testimonial-wrapper"); 327 $(".testimonial-wrapper.owl-theme .owl-dots .owl-dot").click(function () { 328 owltestimonial.trigger("to.owl.carousel", [$(this).index(), 300]); 329 }); 330 331 /* 09. BLOG SLIDER JS */ 332 $(".blog-slides").owlCarousel({ 333 items: 3, 334 margin: 30, 335 loop: true, 336 autoplay: false, 337 autoplayTimeout: 4000, 338 nav: false, 339 dots: true, 340 navText: [ 341 "<i class='icofont-long-arrow-left'></i>", 342 "<i class='icofont-long-arrow-right'></i>", 343 ], 344 responsiveClass: true, 345 responsive: { 346 0: { 347 items: 1, 348 }, 349 600: { 350 items: 1, 351 }, 352 768: { 353 items: 2, 354 }, 355 1000: { 356 items: 3, 357 }, 358 }, 359 }); 360 361 /* 10. SERVICE SLIDER JS */ 362 $(".service-slides-wrapper").owlCarousel({ 363 loop: true, 364 margin: 0, 365 autoplay: false, 366 nav: true, 367 navText: [ 368 "<i class='icofont-rounded-left'></i>", 369 "<i class='icofont-rounded-right'></i>", 370 ], 371 autoHeight: true, 372 dots: true, 373 dotsData: true, 374 responsive: { 375 0: { 376 items: 1, 377 }, 378 600: { 379 items: 1, 380 }, 381 1000: { 382 items: 1, 383 }, 384 }, 385 }); 386 387 var owlclass = $(".service-slides-wrapper"); 388 $(".service-slides-wrapper.owl-theme .owl-dots .owl-dot").click( 389 function () { 390 owlclass.trigger("to.owl.carousel", [$(this).index(), 300]); 391 } 392 ); 393 394 /* 11. BLOG GALLERY SLIDER JS */ 395 $(".gallery-slides-wrapper").owlCarousel({ 396 loop: true, 397 margin: 0, 398 autoplay: false, 399 nav: true, 400 navText: [ 401 "<i class='icofont-rounded-left'></i>", 402 "<i class='icofont-rounded-right'></i>", 403 ], 404 autoHeight: true, 405 dots: false, 406 responsive: { 407 0: { 408 items: 1, 409 }, 410 600: { 411 items: 1, 412 }, 413 1000: { 414 items: 1, 415 }, 416 }, 417 }); 418 419 /* 12. CLIENT SLIDER JS */ 420 $(".clients-slides").owlCarousel({ 421 loop: true, 422 margin: 30, 423 autoplay: true, 424 nav: false, 425 autoHeight: true, 426 responsiveClass: true, 427 responsive: { 428 0: { 429 items: 1, 430 dots: true, 431 }, 432 600: { 433 items: 2, 434 dots: true, 435 }, 436 768: { 437 items: 4, 438 dots: false, 439 }, 440 1000: { 441 items: 5, 442 dots: false, 443 }, 444 }, 445 }); 446 447 /* 13. CLASSES SLIDER JS */ 448 449 $(".fea-class-slides").owlCarousel({ 450 items: 3, 451 margin: 30, 452 loop: true, 453 autoplay: false, 454 autoplayTimeout: 4000, 455 dots: true, 456 nav: false, 457 navText: [ 458 "<i class='icofont-rounded-left'></i>", 459 "<i class='icofont-rounded-right'></i>", 460 ], 461 responsiveClass: true, 462 responsive: { 463 0: { 464 items: 1, 465 }, 466 600: { 467 items: 1, 468 }, 469 768: { 470 items: 2, 471 }, 472 1000: { 473 items: 3, 474 }, 475 }, 476 }); 477 478 /* 14. COUNTER SECTION JS */ 479 $("#counter").on("inview", function (event, visible) { 480 if (visible) { 481 $(this) 482 .find(".timer") 483 .each(function () { 484 var $this = $(this); 485 $({ Counter: 0 }).animate( 486 { Counter: parseInt($this.text(), 10) }, 487 { 488 duration: 2000,
489 easing: "swing", 490 step: function (now) { 491 $this.text(Math.ceil(now)); 492 }, 493 complete: function () { 494 $this.text($this.text() + "+"); 495 }, 496 } 497 ); 498 }); 499 $(this).unbind("inview"); 500 } 501 }); 502 503 /* 15. ACCORDION JS */ 504 var selectIds = $("#panel1,#panel2,#panel3,#panel4,#panel5"); 505 $(function ($) { 506 selectIds.on("show.bs.collapse hidden.bs.collapse", function () { 507 $(this) 508 .prev() 509 .find(".icofont") 510 .toggleClass("icofont-minus icofont-plus"); 511 }); 512 }); 513 514 /* 16. PORTFOLIO JS */ 515 $(".portfolio-filter-menu ul li").click(function () { 516 $(".portfolio-filter-menu ul li").removeClass("active"); 517 $(this).addClass("active"); 518 var selector = $(this).attr("data-filter"); 519 $(".project-list").isotope({ 520 filter: selector, 521 }); 522 }); 523 524 $(".project-list").isotope(); 525 526 /* 17. VENOBOX JS */ 527 $(".venobox").venobox({ 528 titleattr: "data-title", 529 spinner: "three-bounce", 530 titlePosition: "bottom", 531 titleColor: "#fff", 532 spinColor: "#fff", 533 numeratio: true, 534 numerationPosition: "top", 535 }); 536 537 /* 18. TIMER JS */ 538 539 $("#clock").countdown("2023/12/31", function (event) { 540 var $this = $(this).html( 541 event.strftime( 542 "" + 543 "<h4>%d :<span>Days</span></h4>" + 544 "<h4>%H :<span>hr</span></h4>" + 545 "<h4>%M :<span>min</span></h4>" + 546 "<h4>%S <span>sec</span></h4>" 547 ) 548 ); 549 }); 550 551 /* 19. COPYRIGHT JS */ 552 var dteNow = new Date(); 553 var intYear = dteNow.getFullYear(); 554 555 $("#copyright").each(function () { 556 var text = $(this).text(); 557 $(this).text(text.replace("CurrentCopyrightYear", intYear)); 558 }); 559 560 /* 20. IMAGE ZOOM JS */ 561 /* 562 $("#zoom_01").elevateZoom({ 563 scrollZoom: true, 564 cursor: "crosshair", 565 zoomWindowFadeIn: 500, 566 zoomWindowFadeOut: 750, 567 }); 568 */ 569 570 // Get current page filename from URL 571 var currentPage = window.location.pathname.split("/").pop(); 572 // Loop through all links in dropdown menus 573 $(".dropdown-menu a").each(function () { 574 var href = $(this).attr("href"); 575 if (href === currentPage) { 576 // If match found, add 'active' to the closest parent li with class 'dropdown' 577 $(this).closest("li.dropdown").addClass("active"); 578 } 579 }); 580 //active .. nav-item 581 $(".nav-item").each(function () { 582 var href = $(this).find("a").attr("href"); 583 if (href === currentPage) { 584 $(this).addClass("active"); 585 } 586 }); 587 }); 588 589 /* 21. WOW JS */ 590 new WOW().init(); 591})(jQuery);
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.