1(function ($) { 2 "use strict"; 3 window.kidba = window.kidba || {}; 4 var windowOn = $(window); 5 windowOn.on('load',function() { 6 $("#loading").fadeOut(500); 7 }); 8 9$(document).ready(function(){ 10 $('#mobile-menu').meanmenu({ 11 meanMenuContainer: '.mobile-menu', 12 meanScreenWidth: "991", 13 meanExpand: ['+'], 14 }); 15 //======================================================================= 16 // Modal Video / Video Popup Plugin Initialize 17 //======================================================================= 18 $(".video-btn, .blog-video-btn").modalVideo(); 19 //======================================================================= 20 // Odometer / Counter Plugin Initialize 21 //======================================================================= 22 $('.odometer').appear(function(e) { 23 var odo = $(".odometer"); 24 odo.each(function() { 25 var countNumber = $(this).attr("data-count"); 26 $(this).html(countNumber); 27 }); 28 }); 29 // data - background 30 $("[data-background]").each(function () { 31 $(this).css("background-image", "url(" + $(this).attr("data-background") + ")") 32 }) 33 34 $("[data-bg-color]").each(function () { 35 $(this).css("background-color", $(this).attr("data-bg-color")) 36 }) 37 38 39 //range slider activation 40 $("#shop-slider-range").slider({ 41 range: true, 42 min: 0, 43 max: 500, 44 values: [75, 300], 45 slide: function (event, ui) { 46 $("#shop-amount").val("$" + ui.values[0] + " - $" + ui.values[1]); 47 }, 48 }); 49 //======================================================================= 50 // Slider / Swiper Plugin Initialize 51 //======================================================================= 52 if (jQuery(".slider-active").length > 0) { 53 let sliderActive1 = '.slider-active'; 54 var slider_single = $(this).find('.swiper-slide'); 55 var autoplay_prop = slider_single.data('enable-autoplay'); 56 let sliderInit1 = new Swiper(sliderActive1, { 57 // Optional parameters 58 slidesPerView: 1, 59 slidesPerColumn: 1, 60 paginationClickable: true, 61 loop: true, 62 // If we need pagination 63 autoplay: autoplay_prop, 64 pagination: { 65 el: '.swiper-paginations', 66 // dynamicBullets: true, 67 clickable: true, 68 }, 69 70 // Navigation arrows 71 navigation: { 72 nextEl: '.swiper-button-next', 73 prevEl: '.swiper-button-prev', 74 }, 75 76 a11y: false 77 }); 78 79 function animated_swiper(selector, init) { 80 let animated = function animated() { 81 $(selector + ' [data-animation]').each(function () { 82 let anim = $(this).data('animation'); 83 let delay = $(this).data('delay'); 84 let duration = $(this).data('duration'); 85 86 $(this).removeClass('anim' + anim) 87 .addClass(anim + ' animated') 88 .css({ 89 webkitAnimationDelay: delay, 90 animationDelay: delay, 91 webkitAnimationDuration: duration, 92 animationDuration: duration 93 }) 94 .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { 95 $(this).removeClass(anim + ' animated'); 96 }); 97 }); 98 }; 99 animated(); 100 // Make animated when slide change 101 init.on('slideChange', function () { 102 $(sliderActive1 + ' [data-animation]').removeClass('animated'); 103 }); 104 init.on('slideChange', animated); 105 } 106 107 animated_swiper(sliderActive1, sliderInit1); 108 } 109 110 //======================================================================= 111 // Gallery Image Popup 112 //======================================================================= 113 $('.gallery-popup').magnificPopup({ 114 type: 'image', 115 closeOnContentClick: true, 116 closeBtnInside: false, 117 fixedContentPos: true, 118 mainClass: 'mfp-no-margins mfp-with-zoom', 119 image: { 120 verticalFit: true 121 }, 122 zoom: { 123 enabled: true, 124 duration: 400 125 } 126 }); 127 128 //======================================================================= 129 // Testmonial Slider 130 //======================================================================= 131 $('.clients').slick({ 132 slidesToShow: 1, 133 slidesToScroll: 1,
134 arrows: false, 135 fade: true, 136 asNavFor: '.client-feedback', 137 }); 138 $('.client-feedback').slick({ 139 slidesToShow: 1, 140 slidesToScroll: 1, 141 asNavFor: '.clients', 142 dots: true, 143 arrows: false, 144 vertical: true, 145 verticalSwiping: true, 146 }); 147 148 //======================================================================= 149 // Nice Select 150 //======================================================================= 151 $('.course__sort-inner select, .panel-body .form-group select, .woocommerce div.product form.cart .variations select, .blog-sidebar-box.widget_archive select, .blog-sidebar-box.widget_categories select, section.blog-sidebar-box.widget_text .textwidget select, .footer-card select, .wp-block-categories-dropdown.wp-block-categories select, .wp-block-archives-dropdown select').niceSelect(); 152 153 //======================================================================= 154 // Partner logo Slider 155 //======================================================================= 156 $('.partner-slider').slick({ 157 slidesToShow: 5, 158 slidesToScroll: 1, 159 arrows: false, 160 responsive: [ 161 { 162 breakpoint: 1200, 163 settings: { 164 slidesToShow: 4, 165 } 166 }, 167 { 168 breakpoint: 992, 169 settings: { 170 slidesToShow: 3, 171 } 172 }, 173 { 174 breakpoint: 768, 175 settings: { 176 slidesToShow: 3, 177 } 178 }, 179 { 180 breakpoint: 575, 181 settings: { 182 slidesToShow: 2, 183 } 184 }, 185 ], 186 }); 187 188 //======================================================================= 189 // Shop details image Slider 190 //======================================================================= 191 $('.shop-details-lg-images').slick({ 192 slidesToShow: 1, 193 slidesToScroll: 1, 194 arrows: false, 195 fade: true, 196 asNavFor: '.shop-details-sm-images', 197 }); 198 $('.shop-details-sm-images').slick({ 199 slidesToShow: 4, 200 slidesToScroll: 1, 201 asNavFor: '.shop-details-lg-images', 202 dots: false, 203 arrows: true, 204 autoplay: false, 205 centerMode: true, 206 centerPadding: '0', 207 focusOnSelect: true, 208 prevArrow: '<button class="shop-slick-prev"><i class="icofont-thin-left"></i></button>', 209 nextArrow: '<button class="shop-slick-next"><i class="icofont-thin-right"></i></button>' 210 }); 211 212 //======================================================================= 213 // Jquery ui datepicker 214 //======================================================================= 215 $( "#datepicker" ).datepicker(); 216 217 // product quantity 218 $('.quantity').each(function () { 219 var spinner = jQuery(this), 220 input = spinner.find('input[type="number"]'), 221 btnUp = spinner.find('.quantity-up'), 222 btnDown = spinner.find('.quantity-down'), 223 min = input.attr('min'), 224 max = input.attr('max'); 225 max = max ? max: false; 226 227 btnUp.on('click', function (e) { 228 var oldValue = parseFloat(input.val()); 229 if(max == false) { 230 var newVal = oldValue + 1; 231 } 232 else if (oldValue >= max) { 233 var newVal = oldValue; 234 } else { 235 var newVal = oldValue + 1; 236 } 237 spinner.find("input").val(newVal); 238 spinner.find("input").trigger("change"); 239 }); 240 241 btnDown.on('click', function () { 242 var oldValue = parseFloat(input.val()); 243 if (oldValue <= min) { 244 var newVal = oldValue; 245 } else { 246 var newVal = oldValue - 1; 247 } 248 spinner.find("input").val(newVal); 249 spinner.find("input").trigger("change"); 250 }); 251 252 }); 253 //======================================================================= 254 // Blog page image Slider 255 //======================================================================= 256 $('.blog-image-slider').slick({ 257 slidesToShow: 1, 258 slidesToScroll: 1,
259 prevArrow: '<button class="blog-slider-btn"><i class="icofont-caret-left"></i></button>', 260 nextArrow: '<button class="blog-slider-btn btn-next"><i class="icofont-caret-right"></i></button>', 261 }); 262}); 263$('.navbar-toggler').on('click', function() { 264 $('.kidba-menu-sidebar').addClass('sidebar-open'); 265 $('.body-overlay').addClass('overlay-open'); 266}); 267$('.sidebar__close-btn, .body-overlay').on('click', function() { 268 $('.kidba-menu-sidebar').removeClass('sidebar-open'); 269 $('.body-overlay').removeClass('overlay-open'); 270}); 271// if cart added show popup 272$('body').on('added_to_cart',function(args){ 273 $('.product-add-cart-success-alert').append('<span clas="status">Product Added Successfully!</span>'); 274 setTimeout(() => { 275 $('.product-add-cart-success-alert span').hide(300); 276 }, 5000); 277}); 278// menu-last class 279$('.header-style-1 .navbar-nav > li.nav-item').slice(-4).addClass('menu-last'); 280 281var CB_Blog = function($scope, $) { 282 $scope.find('.blog-slider').each(function() { 283 // Blog Slider 284 $('.blog-slider').slick({ 285 dots: false, 286 infinite: true, 287 speed: 1000, 288 autoplay: true, 289 autoplaySpeed: 2000, 290 slidesToShow: 3, 291 slidesToScroll: 1, 292 arrows: false, 293 responsive: [{ 294 breakpoint: 1200, 295 settings: { 296 slidesToShow: 2, 297 slidesToScroll: 1, 298 arrows: false, 299 } 300 }, 301 { 302 breakpoint: 992, 303 settings: { 304 slidesToShow: 2, 305 slidesToScroll: 1, 306 arrows: false, 307 } 308 }, { 309 breakpoint: 768, 310 settings: { 311 slidesToShow: 1, 312 slidesToScroll: 1, 313 arrows: false, 314 } 315 }, 316 ] 317 }); 318 }) 319} 320var CB_Testimonial = function($scope, $) { 321 $scope.find('.feedback-slider').each(function() { 322 // Feedback Slider 323 $('.feedback-slider').slick({ 324 dots: false, 325 infinite: true, 326 speed: 1000, 327 autoplay: true, 328 autoplaySpeed: 2000, 329 slidesToShow: 2, 330 slidesToScroll: 1, 331 arrows: false, 332 responsive: [{ 333 breakpoint: 1200, 334 settings: { 335 slidesToShow: 2, 336 slidesToScroll: 1, 337 arrows: false, 338 } 339 }, 340 { 341 breakpoint: 992, 342 settings: { 343 slidesToShow: 1, 344 slidesToScroll: 1, 345 arrows: false, 346 } 347 }, { 348 breakpoint: 768, 349 settings: { 350 slidesToShow: 1, 351 slidesToScroll: 1, 352 arrows: false, 353 } 354 }, 355 ] 356 }); 357 }) 358} 359var CB_CounterUp = function($scope, $) { 360 $(".video-play-button a").modalVideo(); 361} 362var CB_Course_Category = function($scope, $) { 363 $scope.find('.category-slider').each(function() { 364 // Category Slider 365 $('.category-slider').slick({ 366 dots: false, 367 infinite: true, 368 speed: 1000, 369 autoplay: true, 370 autoplaySpeed: 2000, 371 slidesToShow: 4, 372 slidesToScroll: 1, 373 arrows: true, 374 prevArrow: '<i class="prev-arrow fa fa-long-arrow-left"></i>', 375 nextArrow: '<i class="next-arrow fa fa-long-arrow-right"></i>', 376 responsive: [{ 377 breakpoint: 1200, 378 settings: { 379 slidesToShow: 3, 380 slidesToScroll: 1, 381 arrows: false, 382 } 383 }, 384 { 385 breakpoint: 992, 386 settings: { 387 slidesToShow: 2, 388 slidesToScroll: 1, 389 arrows: false, 390 } 391 }, { 392 breakpoint: 768, 393 settings: { 394 slidesToShow: 1, 395 slidesToScroll: 1,
396 arrows: false, 397 } 398 }, 399 ] 400 }); 401 402 // Course Details Tab 403 $(".tab-accordion ul li").on('click', function () { 404 var tabClass = $(this).attr("class"); 405 $(this).addClass("active").siblings().removeClass("active"); 406 $("." + tabClass + "-content").addClass("active").siblings().removeClass("active"); 407 }); 408 }); 409} 410const CB_Hero = function($scope, $) { 411 $scope.find('[data-background]').each(function() { 412 // data - background 413 $("[data-background]").each(function () { 414 $(this).css("background-image", "url(" + $(this).attr("data-background") + ")") 415 }) 416 }) 417 $scope.find('.play-button').each(function() { 418 $('.play-button').magnificPopup({ 419 type: 'iframe' 420 }); 421 }) 422} 423const CB_About = function($scope, $) { 424 $scope.find('.video-play-button a').each(function() { 425 $('.video-play-button a').magnificPopup({ 426 type: 'iframe' 427 }); 428 }) 429} 430$( window ).on( 'elementor/frontend/init', function() { 431 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-testimonial.default', CB_Testimonial ); 432 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-blog.default', CB_Blog ); 433 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-course-category.default', CB_Course_Category ); 434 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-counter-up.default', CB_CounterUp ); 435 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-hero.default', CB_Hero ); 436 elementorFrontend.hooks.addAction( 'frontend/element_ready/tp-about.default', CB_About ); 437} ); 438})(jQuery); 439
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.