1/* 2 * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 * 4 * Template Name: Appmyil - Business Consulting Bootstrap4 Template 5 * Template URI: https://thememarch.com/demo/html/appmyil/ 6 * Description: Appmyil is a business consulting HTML template which comes with the unique and clean design. It helps you to create a beautiful business consulting HTML website. It has also e-commerce support. E-commerce pages are included on this template. 7 * Author: Thememarch 8 * Author URI: https://thememarch.com 9 * Version: 2.0 10 * 11 * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 12 */ 13 14/* 15=========================================================== 16 #INDEX# 17=========================================================== 18 19 --> Custom Functions 20 --> Preloader Activation 21 --> Preloader Cancellation 22 --> Inline Background Image 23 --> Slider Activation 24 -> Sreenshot Slider 25 -> Team Slider 26 -> Blog Slider 27 -> Testimonial Slider 28 -> Slider Initializer 29 --> CounterUp Activation 30 --> Funfact Masonry 31 --> Dynamic Pricebox 32 --> Contact Form Effect 33 --> Scroll To Section 34 --> Sticky Header 35 --> Meanmenu Active 36 --> Breadcrumb Padding 37 --> Scrollspy Active 38 --> Fancybox Init 39 --> Mailchimp Activation 40 --> Scorll Up Implememt 41 --> Ease Scroll 42 --> Heroslider ScrollMagic 43 --> Blog Masonry Active 44 --> Ajax Mailer 45 --> Initializer 46 47=========================================================== 48 #END INDEX# 49=========================================================== 50*/ 51 52(function ($) { 53 "use strict"; 54 55 /* Custom Functions */ 56 jQuery.fn.exists = function () { 57 return this.length > 0; 58 }; 59 60 /* Preloader Activation */ 61 $(window).on("load", function () { 62 $(".tm-preloader").delay(150).fadeOut("slow"); 63 }); 64 65 var smController = new ScrollMagic.Controller(); 66 67 var appmyil = { 68 /* Preloader Cancellation */ 69 preloaderCancellation: function () { 70 $(".tm-preloader") 71 .find(".tm-button") 72 .on("click", function () { 73 $(this).parent(".tm-preloader").fadeOut("slow"); 74 }); 75 }, 76 77 /* Inline Background Image */ 78 dataBgImage: function () { 79 $("[data-bgimage]").each(function () { 80 var imageUrl = $(this).data("bgimage"); 81 $(this).css({ 82 "background-image": "url(" + imageUrl + ")", 83 }); 84 }); 85 }, 86 87 /* Slider Activation */ 88 sliderActivation: { 89 /* Sreenshot Slider */ 90 screenshotSlider: function () { 91 var tmsreenshotSlider = $(".tm-screenshots-slider").slick({ 92 infinite: true, 93 autoplay: false, 94 autoplaySpeed: 5000, 95 slidesToScroll: 1, 96 slidesToShow: 3, 97 centerMode: true, 98 centerPadding: "0", 99 focusOnSelect: true, 100 arrows: true, 101 prevArrow: 102 '<button class="tm-slider-arrow-prev"><i class="zmdi zmdi-long-arrow-left"></i></button>', 103 nextArrow: 104 '<button class="tm-slider-arrow-next"><i class="zmdi zmdi-long-arrow-right"></i></button>', 105 dots: false, 106 responsive: [ 107 { 108 breakpoint: 992, 109 settings: { 110 slidesToShow: 3, 111 slidesToScroll: 1, 112 }, 113 }, 114 { 115 breakpoint: 576, 116 settings: { 117 slidesToShow: 1, 118 slidesToScroll: 1, 119 }, 120 }, 121 ], 122 }); 123 }, 124 125 /* Team Slider */ 126 teamMemberSlider: function () { 127 $(".tm-team-slider").slick({ 128 infinite: true, 129 autoplay: true, 130 autoplaySpeed: 5000, 131 slidesToShow: 4, 132 slidesToScroll: 1, 133 arrows: true, 134 prevArrow: 135 '<button class="tm-slider-arrow-prev"><i class="zmdi zmdi-long-arrow-left"></i></button>', 136 nextArrow: 137 '<button class="tm-slider-arrow-next"><i class="zmdi zmdi-long-arrow-right"></i></button>', 138 dots: false, 139 responsive: [ 140 { 141 breakpoint: 1200, 142 settings: { 143 slidesToShow: 3, 144 slidesToScroll: 1, 145 }, 146 }, 147 { 148 breakpoint: 992, 149 settings: { 150 slidesToShow: 2, 151 slidesToScroll: 1, 152 }, 153 }, 154 { 155 breakpoint: 768, 156 settings: { 157 slidesToShow: 1, 158 slidesToScroll: 1, 159 }, 160 }, 161 ], 162 }); 163 }, 164 165 /* Blog Slider */ 166 blogSlider: function () { 167 $(".tm-blog-slider").slick({ 168 infinite: true, 169 autoplay: true, 170 autoplaySpeed: 5000, 171 slidesToShow: 3, 172 slidesToScroll: 1, 173 centerMode: true, 174 centerPadding: "0", 175 focusOnSelect: true, 176 arrows: true, 177 prevArrow: 178 '<button class="tm-slider-arrow-prev"><i class="zmdi zmdi-long-arrow-left"></i></button>', 179 nextArrow: 180 '<button class="tm-slider-arrow-next"><i class="zmdi zmdi-long-arrow-right"></i></button>', 181 dots: false, 182 responsive: [ 183 { 184 breakpoint: 992, 185 settings: { 186 slidesToShow: 2, 187 slidesToScroll: 1, 188 }, 189 }, 190 { 191 breakpoint: 768, 192 settings: { 193 slidesToShow: 1, 194 slidesToScroll: 1, 195 adaptiveHeight: true, 196 }, 197 }, 198 ], 199 }); 200 }, 201 202 /* Testimonial Slider */ 203 testimonialSlider: function () { 204 $(".tm-testimonial-contents").slick({ 205 slidesToShow: 1, 206 slidesToScroll: 1, 207 fade: true, 208 asNavFor: ".tm-testimonial-authors", 209 autoplay: true, 210 arrows: true, 211 prevArrow: 212 '<button class="tm-slider-arrow-prev"><i class="zmdi zmdi-long-arrow-left"></i></button>', 213 nextArrow: 214 '<button class="tm-slider-arrow-next"><i class="zmdi zmdi-long-arrow-right"></i></button>', 215 }); 216 217 $(".tm-testimonial-authors").slick({ 218 slidesToShow: 3, 219 slidesToScroll: 1, 220 asNavFor: ".tm-testimonial-contents", 221 dots: false, 222 centerMode: true, 223 centerPadding: 0, 224 focusOnSelect: true, 225 autoplay: true, 226 }); 227 }, 228 229 /* Slider Initializer */ 230 init: function () { 231 appmyil.sliderActivation.screenshotSlider(); 232 appmyil.sliderActivation.teamMemberSlider(); 233 appmyil.sliderActivation.blogSlider(); 234 appmyil.sliderActivation.testimonialSlider(); 235 }, 236 }, 237 238 /* CounterUp Activation */ 239 counterupActivation: function () { 240 if ($(".odometer").length) { 241 $(window).on("scroll", function () { 242 function winScrollPosition() { 243 var scrollPos = $(window).scrollTop(), 244 winHeight = $(window).height(); 245 var scrollPosition = Math.round(scrollPos + winHeight / 1.2); 246 return scrollPosition; 247 } 248 var elemOffset = $(".odometer").offset().top; 249 if (elemOffset < winScrollPosition()) { 250 $(".odometer").each(function () {
251 $(this).html($(this).data("count-to")); 252 }); 253 } 254 }); 255 } 256 }, 257 258 /* Funfact Masonry */ 259 funfactMasonryActive: function () { 260 $(".tm-funfact-wrapper").masonry({ 261 itemSelector: ".tm-funfact-masonryitem", 262 columnWidth: 1, 263 }); 264 }, 265 266 /* Dynamic Pricebox */ 267 dynamicPricebox: function () { 268 function activeKey() { 269 $(".tm-pricebox-switchbuttons") 270 .find("button") 271 .on("click", function () { 272 $(this) 273 .addClass("is-active") 274 .siblings("button") 275 .removeClass("is-active"); 276 }); 277 return $(".tm-pricebox-switchbuttons") 278 .find("button.is-active") 279 .data("keyvalue"); 280 } 281 282 function priceChanger() { 283 $(".tm-pricebox-price-digit").each(function () { 284 var monthlyPrice = $(this).data("pricebox-price-monthly"); 285 var yearlyPrice = $(this).data("pricebox-price-yearly"); 286 287 if (activeKey() === "monthly") { 288 $(this).text(monthlyPrice); 289 } else { 290 $(this).text(yearlyPrice); 291 } 292 }); 293 } 294 priceChanger(); 295 296 function textChanger() { 297 $(".tm-pricebox-price-time").each(function () { 298 var monthlyText = $(this).data("monthly-text"); 299 var yearlyText = $(this).data("yearly-text"); 300 301 if (activeKey() === "monthly") { 302 $(this).text(monthlyText); 303 } else { 304 $(this).text(yearlyText); 305 } 306 }); 307 } 308 textChanger(); 309 310 $(".tm-pricebox-switchbuttons") 311 .find("button") 312 .on("click", function () { 313 priceChanger(); 314 textChanger(); 315 }); 316 }, 317 318 /* Contact Form Effect */ 319 contactFormEffect: function () { 320 $(".tm-form-field").on("focus", "input, textarea", function () { 321 $(this).siblings(".tm-form-animatedline").css("width", "100%"); 322 }); 323 $(".tm-form-field").on("focusout", "input, textarea", function () { 324 $(this).siblings(".tm-form-animatedline").css("width", 0); 325 var $this = $(this); 326 if ($this.val().trim().length !== 0) { 327 $(this).siblings(".tm-form-animatedline").css("width", "100%"); 328 } 329 }); 330 }, 331 332 /* Scroll To Section */ 333 scrollToSection: function () { 334 $(".tm-heroslider-scrolldown").on("click", function (event) { 335 event.preventDefault(); 336 var $anchor = $(this); 337 $("html, body") 338 .stop() 339 .animate( 340 { 341 scrollTop: $($anchor.attr("href")).offset().top - 65, 342 }, 343 1000 344 ); 345 }); 346 }, 347 348 /* Sticky Header */ 349 stickyHeaderActive: function () { 350 $(window).on("scroll", function () { 351 if ($(this).scrollTop() >= 1) { 352 $(".tm-sticky-header").addClass("is-sticky"); 353 } else { 354 $(".tm-sticky-header").removeClass("is-sticky"); 355 } 356 }); 357 }, 358 359 /* Meanmenu Active */ 360 /* Meanmenu Active */ 361 meanmenuActive: function () { 362 $("nav.tm-navigation").meanmenu({ 363 meanMenuContainer: ".tm-mobilenav", 364 meanScreenWidth: "991", 365 meanMenuOpen: '<i class="zmdi zmdi-menu"></i>', 366 meanMenuClose: '<i class="zmdi zmdi-close"></i>', 367 }); 368 369 // Handle only internal anchor links within the mobile navigation 370 $('.tm-mobilenav nav.mean-nav li a[href^="#"]').on( 371 "click", 372 function (event) { 373 var $anchor = $(this); 374 375 // Prevent default only for internal links 376 event.preventDefault(); 377 $("html, body") 378 .stop() 379 .animate( 380 { 381 scrollTop: $($anchor.attr("href")).offset().top - 65, 382 }, 383 1000 384 ); 385 } 386 ); 387 }, 388 389 /* Breadcrumb Padding */ 390 breadcrumbPadding: function () { 391 if ($(".tm-header-fixed").exists()) { 392 var headerHeight = $(".tm-header-fixed").innerHeight(); 393 $(".tm-breadcrumb").css({ 394 paddingTop: headerHeight + "px", 395 }); 396 } 397 }, 398 399 /* Scrollspy Active */ 400 scrollSpyActive: function () { 401 $(".tm-navigation").scrollspy({ 402 offset: -65, 403 activeClass: "current", 404 animate: "swing", 405 }); 406 }, 407 408 /* Fancybox Init */ 409 fancyboxInit: function () { 410 $("[data-fancybox]").fancybox(); 411 }, 412 413 /* Mailchimp Activation */ 414 ajaxMailchimp: function () { 415 $("#tm-mailchimp-form").ajaxChimp({ 416 language: "en", 417 callback: mailChimpResponse, 418 // ADD YOUR MAILCHIMP URL BELOW HERE! 419 url: "YOUR_MAILCHIMP_URL_HERE", 420 }); 421 422 function mailChimpResponse(resp) { 423 if (resp.result === "success") { 424 $(".tm-mailchimp-success") 425 .html("" + resp.msg) 426 .fadeIn(900);
427 $(".tm-mailchimp-error").fadeOut(400); 428 } else if (resp.result === "error") { 429 $(".tm-mailchimp-error") 430 .html("" + resp.msg) 431 .fadeIn(900); 432 } 433 } 434 }, 435 436 /* Scorll Up Implememt */ 437 scrollUpActive: function () { 438 $( 439 '<button id="scrollUp"><i class="zmdi zmdi-chevron-up"></i></button>' 440 ).appendTo("body"); 441 $(window).on("scroll", function () { 442 var winHeight = $(this).height(); 443 var winScrollPos = $(this).scrollTop(); 444 if (winScrollPos > winHeight + 100) { 445 $("#scrollUp").addClass("is-visible"); 446 } else { 447 $("#scrollUp").removeClass("is-visible"); 448 } 449 }); 450 $("#scrollUp").on("click", function () { 451 $("html, body").animate( 452 { 453 scrollTop: 0, 454 }, 455 "slow" 456 ); 457 return false; 458 }); 459 }, 460 461 /* Ease Scroll */ 462 easeScrollActive: function () { 463 $("html").easeScroll(); 464 }, 465 466 /* Heroslider ScrollMagic */ 467 herosliderScrollMagic: function () { 468 var winWidth = $(window).width(); 469 if (winWidth >= 992) { 470 new ScrollMagic.Scene({ 471 duration: 0, 472 offset: 0, 473 }) 474 .setPin(".tm-heroslider-inner", { 475 pushFollowers: false, 476 }) 477 .addTo(smController); 478 479 $(window).on("scroll", function () { 480 var winScrollPos = $(this).scrollTop(); 481 var opacity = 1 - winScrollPos / 750; 482 $(".tm-heroslider-content, .tm-heroslider-mobileshow ").css({ 483 opacity: opacity, 484 }); 485 }); 486 } 487 }, 488 489 /* Blog Masonry Active */ 490 blogMasonryActive: function () { 491 $(".blog-masonry-active").masonry({ 492 itemSelector: ".blog-masonry-item", 493 }); 494 }, 495 496 /* Ajax Mailer */ 497 ajaxMailer: function () { 498 // Get the form. 499 var form = $("#tm-contactform"); 500 501 // Get the messages div. 502 var formMessages = $(".form-messages"); 503 504 // TODO: The rest of the code will go here... 505 506 // Set up an event listener for the contact form. 507 $(form).submit(function (event) { 508 // Stop the browser from submitting the form. 509 event.preventDefault(); 510 511 // Serialize the form data. 512 var formData = $(form).serialize(); 513 514 // Submit the form using AJAX. 515 $.ajax({
516 type: "POST", 517 url: 'https://secure.mobileroo.com.au/Crafty/sendmailForCraftyContactUs', 518 crossDomain: true, 519 data: formData, 520 }) 521 522 .done(function (response) { 523 // Make sure that the formMessages div has the 'success' class. 524 $(formMessages).removeClass("error"); 525 $(formMessages).addClass("success"); 526 527 // Set the message text. 528 $(formMessages).text(response); 529 530 // Clear the form. 531 $( 532 '#tm-contactform input:not([type="submit"]), #tm-contactform textarea' 533 ).val(""); 534 }) 535 536 .fail(function (data) { 537 // Make sure that the formMessages div has the 'error' class. 538 $(formMessages).removeClass("success"); 539 $(formMessages).addClass("error"); 540 541 // Set the message text. 542 if (data.responseText !== "") { 543 $(formMessages).text(data.responseText); 544 } else { 545 $(formMessages).text( 546 "Oops! An error occured and your message could not be sent." 547 ); 548 } 549 }); 550 }); 551 }, 552 553 /* Service Image Anim */ 554 serviceImageAnim: function () { 555 setInterval(function () { 556 const randomNumber = Math.floor(Math.random() * (5)) + 1; 557 $('.tm-service-image-1').removeClass('is-visible'); 558 $('.tm-service-image-2').removeClass('is-visible'); 559 $('.tm-service-image-3').removeClass('is-visible'); 560 $('.tm-service-image-4').removeClass('is-visible'); 561 $('.tm-service-image-5').removeClass('is-visible'); 562 563 if (randomNumber == 1) { 564 $('.tm-service-image-1').addClass('is-visible'); 565 } 566 if (randomNumber == 2) { 567 $('.tm-service-image-2').addClass('is-visible'); 568 } 569 if (randomNumber == 3) { 570 $('.tm-service-image-3').addClass('is-visible'); 571 } 572 if (randomNumber == 4){ 573 $('.tm-service-image-4').addClass('is-visible'); 574 } 575 if (randomNumber == 5) { 576 $('.tm-service-image-5').addClass('is-visible'); 577 } 578 }, 5000); 579 }, 580 581 /* Initializer */ 582 init: function () { 583 appmyil.preloaderCancellation(); 584 appmyil.dataBgImage(); 585 appmyil.sliderActivation.init(); 586 appmyil.counterupActivation(); 587 appmyil.funfactMasonryActive(); 588 appmyil.dynamicPricebox(); 589 appmyil.contactFormEffect(); 590 appmyil.scrollToSection(); 591 appmyil.stickyHeaderActive(); 592 appmyil.meanmenuActive(); 593 appmyil.breadcrumbPadding(); 594 appmyil.scrollSpyActive(); 595 appmyil.fancyboxInit(); 596 appmyil.ajaxMailchimp(); 597 appmyil.scrollUpActive(); 598 appmyil.easeScrollActive(); 599 appmyil.herosliderScrollMagic(); 600 appmyil.blogMasonryActive(); 601 appmyil.ajaxMailer(); 602 appmyil.serviceImageAnim(); 603 }, 604 }; 605 606 appmyil.init(); 607})(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.