1/** 2* 3* -------------------------------------------------------------------- 4* 5* Template : Firecamp - Education WordPress Theme 6* 7* -------------------------------------------------------------------- 8* 9**/ 10 11(function($) { 12 "use strict"; 13 // sticky menu 14 var header = $('.menu-sticky'); 15 var win = $(window); 16 var headerinnerHeight = $(".toolbar-area").innerHeight(); 17 18 win.on('scroll', function() { 19 var scroll = win.scrollTop(); 20 if (scroll < headerinnerHeight) { 21 header.removeClass("sticky"); 22 } else { 23 header.addClass("sticky"); 24 } 25 }); 26 27 $(".widget_nav_menu li a").filter(function(){ 28 return $.trim($(this).html()) == ''; 29 }).hide(); 30 31 $(function () { 32 if ($('.learn-press-form-login').hasClass('learn-press-form')) { 33 $('body').addClass('login-form-body'); 34 } 35 }); 36 37 //Parallax 38 if($('.paroller').length){ 39 $('.paroller').paroller({ 40 factor: 0.2, // multiplier for scrolling speed and offset, +- values for direction control 41 factorLg: 0.4, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 42 type: 'foreground', // background, foreground 43 direction: 'horizontal' // vertical, horizontal 44 }); 45 } 46 47 48 // collapse hidden 49 $(function(){ 50 var navMain = $(".navbar-collapse"); // avoid dependency on #id 51 // "a:not([data-toggle])" - to avoid issues caused 52 // when you have dropdown inside navbar 53 navMain.on("click", "a:not([data-toggle])", null, function () { 54 navMain.collapse('hide'); 55 }); 56 }); 57 58 // video 59 if ($('.player').length) { 60 $(".player").YTPlayer(); 61 } 62 63 64 65 /*---------------------------- 66 Testimonial js active 67 ------------------------------ */ 68 69 var sliderfor = $('.slider-for'); 70 if(sliderfor.length){ 71 $('.slider-for').slick({ 72 slidesToShow: 1, 73 slidesToScroll: 1, 74 arrows: false, 75 fade: false, 76 asNavFor: '.slider-nav', 77 }); 78 } 79 var slidernav = $('.slider-nav'); 80 if(slidernav.length){ 81 $('.slider-nav').slick({ 82 slidesToShow: 3, 83 slidesToScroll: 1, 84 asNavFor: '.slider-for', 85 dots: false, 86 arrows: false, 87 loop:true, 88 vertical: true, 89 centerMode: true, 90 centerPadding: '0', 91 focusOnSelect: true, 92 directionNav: true, 93 responsive: [ 94 { 95 breakpoint: 768, 96 settings: { 97 vertical: false, 98 } 99 } 100 // You can unslick at a given breakpoint now by adding: 101 // settings: "unslick" 102 // instead of a settings object 103 ] 104 }); 105 } 106 107 108 //Phone Number 109 110 $('.phone_call').on('click', function(event) { 111 $('.phone_num_call').slideToggle('show'); 112 }); 113 114 //search 115 116 $('.sticky_search').on('click', function(event) { 117 $('.sticky_form').slideToggle('show'); 118 $( '.sticky_form input' ).focus(); 119 }); 120 121 122 123 $('.sticky_search').on('click', function() { 124 $('body').removeClass('search-active').removeClass('search-close'); 125 if ($(this).hasClass('close-full')) { 126 $('body').addClass('search-close'); 127 } 128 else { 129 $('body').addClass('search-active'); 130 } 131 return false; 132 }); 133 134 135 136 $('.sticky_form_search').on('click', function() { 137 $('body, html').removeClass('rs-search-active').removeClass('rs-search-close'); 138 if ($(this).hasClass('close-search')) { 139 $('body, html').addClass('rs-search-close'); 140 141 } 142 else { 143 $('body, html').addClass('rs-search-active'); 144 } 145 return false; 146 }); 147 148 // Get a quote popup 149 150 $('.popup-quote').magnificPopup({ 151 type: 'inline', 152 preloader: false, 153 focus: '#qname', 154 removalDelay: 500, //delay removal by X to allow out-animation 155 // When elemened is focused, some mobile browsers in some cases zoom in 156 // It looks not nice, so we disable it: 157 callbacks: { 158 beforeOpen: function() { 159 this.st.mainClass = this.st.el.attr('data-effect'); 160 if($(window).width() < 700) { 161 this.st.focus = false;
162 } else { 163 this.st.focus = '#qname'; 164 } 165 } 166 } 167 }); 168 169 170 // Canvas Menu Js 171 $( ".nav-link-container > a" ).off("click").on("click", function(event){ 172 event.preventDefault(); 173 $(".nav-link-container").toggleClass("nav-inactive-menu-link-container"); 174 $(".mobile-menus").toggleClass("nav-active-menu-container"); 175 }); 176 177 $(".nav-close-menu-li > a").on('click', function(event){ 178 $(".mobile-menus").toggleClass("nav-active-menu-container"); 179 $(".content").toggleClass("inactive-body"); 180 }); 181 182 183 // Elements Animation 184 if ($('.wow').length) { 185 var wow = new WOW( 186 { 187 boxClass: 'wow', // animated element css class (default is wow) 188 animateClass: 'animated', // animation css class (default is animated) 189 offset: 0, // distance to the element when triggering the animation (default is 0) 190 mobile: false, // trigger animations on mobile devices (default is true) 191 live: true // act on asynchronously loaded content (default is true) 192 } 193 ); 194 wow.init(); 195 } 196 197 // team init 198 $(".team-carousel").each(function() { 199 var options = $(this).data('carousel-options'); 200 $(this).owlCarousel(options); 201 }); 202 203 204 205 // partner init 206 207 $(".partner-carousel").each(function() { 208 var options = $(this).data('carousel-options'); 209 $(this).owlCarousel(options); 210 }); 211 212 // partner init 213 214 $('.gallery-slider').slick({ 215 slidesToShow: 3, 216 slidesToScroll: 1, 217 centerMode: true, 218 focusOnSelect: true, 219 dots: false, 220 centerPadding: '228px', 221 arrows: true, 222 responsive: [{ 223 breakpoint: 1200, 224 settings: { 225 centerPadding: '188px', 226 } 227 }, { 228 breakpoint: 970, 229 settings: { 230 arrows: true, 231 centerPadding: '144px', 232 } 233 }, { 234 breakpoint: 767, 235 settings: { 236 arrows: true, 237 centerPadding: '0px', 238 } 239 }, { 240 breakpoint: 350, 241 settings: { 242 arrows: false, 243 centerPadding: '0px', 244 dots: true, 245 slidesToShow: 1, 246 } 247 }, ] 248 }); 249 250 251 // testimonial init 252 $('.testi-carousel').slick({ 253 centerMode: true, 254 centerPadding: '0px', 255 slidesToShow: 3, 256 focusOnSelect: true, 257 responsive: [ 258 { 259 breakpoint: 768, 260 settings: { 261 arrows: false, 262 centerMode: true, 263 centerPadding: '0px', 264 slidesToShow: 3 265 } 266 }, 267 { 268 breakpoint: 480, 269 settings: { 270 arrows: false, 271 centerMode: true, 272 centerPadding: '0px', 273 slidesToShow: 1 274 } 275 } 276 ] 277 }); 278 279 280 $(".testi-item a.tab").on('click', function(e){ 281 e.preventDefault(); 282 slideIndex = $(this).index(); 283 $( '.testi-carousel' ).slickGoTo( parseInt(slideIndex) ); 284 }); 285 286 // Portfolio Single Carousel 287 if ($('.cdev').length) { 288 $(".cdev").circlos(); 289 } 290 291 // Portfolio Single Carousel 292 if ($('.portfolio-carousel').length) { 293 $('.portfolio-carousel').owlCarousel({ 294 loop: true, 295 nav:true, 296 autoHeight:true, 297 items:1 298 }) 299 } 300 301 //for potfolio slider 302 303 if ($('.portfolio-slider-data').length) { 304 var sliderDots = ""; 305 if(portfolio_data.slider_dots==1){ 306 sliderDots = true; 307 } 308 var sliderNav = ""; 309 if(portfolio_data.nav==1){ 310 sliderNav = true; 311 } 312 313 $(".portfolio-slider-data").each(function() { 314 $(".portfolio-slider-data").slick({ 315 slidesToShow: portfolio_data.col_lg, 316 centerMode: false, 317 dots: sliderDots, 318 arrows: sliderNav, 319 autoplay: portfolio_data.autoplay, 320 slidesToScroll: 2, 321 centerPadding: '15px', 322 autoplaySpeed: portfolio_data.autoplaySpeed, 323 pauseOnHover: portfolio_data.pauseOnHover, 324 prevArrow:"<button type='button' class='slick-prev pull-left'><i class='glyph-icon flaticon-left-arrow' aria-hidden='true'></i></button>", 325 nextArrow:"<button type='button' class='slick-next pull-right'><i class='glyph-icon flaticon-right-arrow' aria-hidden='true'></i></button>", 326 responsive: [{ 327 breakpoint: 1400, 328 settings: { 329 centerPadding: '15px', 330 slidesToShow: portfolio_data.col_lg, 331 slidesToScroll: 1, 332 } 333 }, 334 { 335 breakpoint: 1200, 336 settings: { 337 centerPadding: '15px', 338 slidesToShow: portfolio_data.col_md, 339 slidesToScroll: 1, 340 } 341 }, 342 { 343 breakpoint: 767, 344 settings: { 345 centerPadding: '10px', 346 slidesToShow: portfolio_data.col_sm, 347 slidesToScroll: 1, 348 } 349 }, 350 { 351 breakpoint: 480, 352 settings: { 353 centerPadding: '5px', 354 slidesToShow: portfolio_data.col_xs, 355 slidesToScroll: 1, 356 } 357 }, 358 { 359 breakpoint: 350, 360 settings: { 361 centerPadding: '0px', 362 slidesToShow: portfolio_data.col_mobile, 363 slidesToScroll: 1, 364 } 365 }, ] 366 }); 367 }); 368 } 369 370 371 372 // blog init 373 $(".blog-carousel").each(function() { 374 var options = $(this).data('carousel-options'); 375 $(this).owlCarousel(options); 376 }); 377 378 379 $(function(){ 380 $( "ul.children" ).addClass( "sub-menu" ); 381 }); 382 383 $(".rs-products-grid .product-btn .button").addClass("glyph-icon flaticon-shopping-bag"); 384 385 //Videos popup jQuery activation code 386 $('.popup-videos').magnificPopup({ 387 disableOn: 10, 388 type: 'iframe', 389 mainClass: 'mfp-fade', 390 removalDelay: 160, 391 preloader: false, 392
393 fixedContentPos: false 394 }); 395 //type writer 396 $(".rs-banner .cd-words-wrapper p:first-child").addClass("is-visible"); 397 398 399 // collapse hidden 400 $(function(){ 401 var navMain = $(".navbar-collapse"); // avoid dependency on #id 402 // "a:not([data-toggle])" - to avoid issues caused 403 // when you have dropdown inside navbar 404 navMain.on("click", "a:not([data-toggle])", null, function () { 405 navMain.collapse('hide'); 406 }); 407 408 }); 409 410 411 //CountDown Timer 412 var CountTimer = $('.CountDownTimer'); 413 if(CountTimer.length){ 414 $(".CountDownTimer").TimeCircles({ 415 fg_width: 0.030, 416 bg_width: 0.8, 417 circle_bg_color: "#ffffff", 418 419 time: { 420 Days:{ 421 text: countdown_data.day_text, 422 }, 423 Hours:{ 424 text: countdown_data.hour_text, 425 }, 426 Minutes:{ 427 text: countdown_data.min_text, 428 }, 429 Seconds:{ 430 text: countdown_data.sec_text, 431 } 432 } 433 }); 434 } 435 436 437 if ($('div').hasClass('openingfoot')) { 438 $('body').addClass('openingfootwrap'); 439 } 440 441 // Sticky Sidebar 442 $('.contents-sticky, .sticky-sidebar').theiaStickySidebar({ 443 additionalMarginTop: 60, 444 additionalMarginBottom: 50, 445 }); 446 447 448 449 //CountDown Timer 450 var CountTimer = $('.CountDownTimer4'); 451 if(CountTimer.length){ 452 $(".CountDownTimer4").TimeCircles({}); 453 } 454 455 //preloader 456 $(window).on( 'load', function() { 457 $("#firecamp-load").delay(1000).fadeOut(500); 458 $(".firecamp-loader").delay(1000).fadeOut(500); 459 460 if($(window).width() < 992) { 461 $('.rs-menu').css('height', '0'); 462 $('.rs-menu').css('opacity', '0'); 463 $('.rs-menu').css('z-index', '-1'); 464 $('.rs-menu-toggle').on( 'click', function(){ 465 $('.rs-menu').css('opacity', '1'); 466 $('.rs-menu').css('z-index', '1'); 467 }); 468 } 469 }) 470 471 472 // magnificPopup init 473 $('.image-popup').magnificPopup({ 474 type: 'image', 475 callbacks: { 476 beforeOpen: function() { 477 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure animated zoomInDown'); 478 } 479 }, 480 gallery: { 481 enabled: true 482 } 483 }); 484 485 486 // Counter Up 487 $('.rs-counter').counterUp({ 488 delay: 20, 489 time: 1500 490 }); 491 492 // scrollTop init 493 var win=$(window); 494 var totop = $('#scrollUp'); 495 win.on('scroll', function() { 496 if (win.scrollTop() > 150) { 497 totop.fadeIn(); 498 } else { 499 totop.fadeOut(); 500 } 501 }); 502 totop.on('click', function() { 503 $("html,body").animate({ 504 scrollTop: 0 505 }, 500) 506 }); 507 508 509 $(function(){ 510 $( "ul.children" ).addClass( "sub-menu" ); 511 }); 512 513 $(".sidenav .menu li").on('click', function() { 514 $(this).children("ul.sub-menu").slideToggle(); 515 }); 516 $( ".comment-body, .comment-respond" ).wrap( "<div class='comment-full'></div>" ); 517 $('.rs-heading .description p:empty').remove(); 518 519 //services style js 520 $(".rs-services-default a").on({ 521 mouseenter: function(){ 522 var title_hover = $(this).data('onhovercolor'); 523 $(this).css('color', title_hover); 524 }, 525 mouseleave: function(){ 526 var title_color = $(this).data('onleavecolor'); 527 $(this).css('color', title_color); 528 } 529 }, this); 530 531 // Heading 6 532 $('.rs-heading.style6 ').each(function( index ){ 533 var borderColor = $(this).find(".sub-text").data('border-color'); 534 $( "<style>.rs-heading.style6 .title-inner .sub-text::after { background: " + borderColor + " }</style>" ).appendTo( "head" ); 535 }); 536 537 // Heading 4 538 $('.rs-heading.style4 ').each(function( index ){ 539 var borderColor = $(this).find(".sub-text").data('border-color'); 540 $( "<style>.rs-heading.style4 .title-inner .sub-text:before, .rs-heading.style4 .title-inner .sub-text:after { background: " + borderColor + " }</style>" ).appendTo( "head" ); 541 }); 542 543 // Heading 11 544 $('.rs-heading.style11').each(function( index ){ 545 var borderColor = $(this).find(".title-inner").data('border-color'); 546 $( "<style>.rs-heading.style11 .title-inner:before { background: " + borderColor + " }</style>" ).appendTo( "head" ); 547 }); 548 549 // Heading 11 Center 550 $('.rs-heading.style11.text-center').each(function( index ){ 551 var borderColor = $(this).find(".title-inner").data('border-color'); 552 $( "<style>.rs-heading.style11.text-center .title-inner:before { background: " + borderColor + " }</style>" ).appendTo( "head" ); 553 }); 554 555 // Heading 2 556 $('.rs-heading.style2').each(function( index ){ 557 var borderColor = $(this).find(".title-inner").data('border-color'); 558 $( "<style>.rs-heading.style2.text-center .title-inner .title:after { background: " + borderColor + " }</style>" ).appendTo( "head" ); 559 }); 560 561 562 563 $(".rs-btn a").on({ 564 mouseenter: function(){ 565 var btnBg = $(this).data('onhoverbg'); 566 var btnColor = $(this).data('onhovercolor'); 567 $(this).css('background-color', btnBg); 568 $(this).css('color', btnColor); 569 }, 570 mouseleave: function(){ 571 var btnHoverBg = $(this).data('onleavebg'); 572 var btnHoverColor = $(this).data('onleavecolor'); 573 $(this).css('background-color', btnHoverBg); 574 $(this).css('color', btnHoverColor); 575 } 576 }, this); 577 578 579 580 581 $(".rs-btn2 a").on({ 582 mouseenter: function(){ 583 var btnBg = $(this).data('onhoverbg'); 584 var btnBorder = $(this).data('onhoverbg'); 585 586 $(this).css('background-color', btnBg); 587 588 $(this).css('color', btnColor); 589 }, 590 mouseleave: function(){ 591 var btnHoverBg = $(this).data('onleavebg'); 592 593 var btnHoverColor = $(this).data('onleavecolor'); 594 595 $(this).css('background-color', btnHoverBg); 596 $(this).css('color', btnHoverColor); 597 } 598 }, this); 599 600 $(".rs-cta .button-wrap a").on({ 601 mouseenter: function(){ 602 var btnBg = $(this).data('hoverbg'); 603 var btnBorder = $(this).data('hoverborder'); 604 var btnColor = $(this).data('hovertext'); 605 606 $(this).css('background-color', btnBg); 607 $(this).css('border-color', btnBorder); 608 $(this).css('color', btnColor); 609 }, 610 mouseleave: function(){ 611 var btnHoverBg = $(this).data('leavebg'); 612 var btnBorder = $(this).data('leaveborder'); 613 var btnHoverColor = $(this).data('leavecolor'); 614 615 $(this).css('background-color', btnHoverBg); 616 $(this).css('border-color', btnBorder); 617 $(this).css('color', btnHoverColor); 618 } 619 }, this); 620 621 622 //woocommerce quantity style 623 if ( ! String.prototype.getDecimals ) { 624 String.prototype.getDecimals = function() { 625 var num = this, 626 match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); 627 if ( ! match ) { 628 return 0; 629 } 630 return Math.max( 0, ( match[1] ? match[1].length : 0 ) - ( match[2] ? +match[2] : 0 ) ); 631 } 632 } 633 // Quantity "plus" and "minus" buttons 634 $( document.body ).on( 'click', '.plus, .minus', function() { 635 var $qty = $( this ).closest( '.quantity' ).find( '.qty'), 636 currentVal = parseFloat( $qty.val() ), 637 max = parseFloat( $qty.attr( 'max' ) ), 638 min = parseFloat( $qty.attr( 'min' ) ), 639 step = $qty.attr( 'step' ); 640 641 // Format values 642 if ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0; 643 if ( max === '' || max === 'NaN' ) max = ''; 644 if ( min === '' || min === 'NaN' ) min = 0; 645 if ( step === 'any' || step === '' || step === undefined || parseFloat( step )
645=== 'NaN' ) step = 1; 646 647 // Change the value 648 if ( $( this ).is( '.plus' ) ) { 649 if ( max && ( currentVal >= max ) ) { 650 $qty.val( max ); 651 } else { 652 $qty.val( ( currentVal + parseFloat( step )).toFixed( step.getDecimals() ) ); 653 } 654 } else { 655 if ( min && ( currentVal <= min ) ) { 656 $qty.val( min ); 657 } else if ( currentVal > 0 ) { 658 $qty.val( ( currentVal - parseFloat( step )).toFixed( step.getDecimals() ) ); 659 } 660 } 661 662 // Trigger change event 663 $qty.trigger( 'change' ); 664 }); 665 666 $('.rs-course-archive-top .course-icons a').on('click', function() { 667 $('body').removeClass('rs-grid-view').removeClass('rs-list-view'); 668 669 if ($(this).hasClass('rs-list')) { 670 $('body').addClass('rs-list-view'); 671 } 672 else { 673 $('body').addClass('rs-grid-view'); 674 } 675 return false; 676 }); 677 678 679})(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.