/** * Wizixo - Multipurpose Corporate Theme * * @author Webestica (https://www.webestica.com/) * @version 1.1.0 */ /* =================== Table Of Content ====================== 01 PRELOADER 02 COUNTER 03 PORTFOLIO ISOTOPE 04 WOW 05 OWL CAROUSEL 06 SWIPER SLIDER 07 BACK TO TOP 08 STICKY BAR 09 STICKY HEADER 10 FIT VIDEO 11 PARALLAX 12 WAVE 13 CONTACT FORM 14 IE DETECTION 15 MEGA MENU ======================*/ (function ($) { "use strict"; // BEGIN: 01 Preloader var preLoader = function() { if($('.preloader').length){ var $preloader = $('.preloader'); $preloader.delay(200).fadeOut(600); } }; // END: Preloader // BEGIN: 07 Back To top var backTotop = function(){ var $backtotop = $('.back-top'); $(window).on('scroll', function() { if ($(this).scrollTop() > 500) { $backtotop.addClass('btn-show'); } else { $backtotop.removeClass('btn-show'); } }); $backtotop.on('click', function() { $('html, body').animate({ scrollTop: 0}, 900, 'easeInOutCirc'); return false; }); }; // END: Back To top // BEGIN: 14 IE Detection /** * detect IE * returns version of IE or false, if browser is not Internet Explorer */ (function detectIE() { var ua = window.navigator.userAgent; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number var ieV = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); document.querySelector('body').className += ' ie-browser'; } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number var rv = ua.indexOf('rv:'); var ieV = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); document.querySelector('body').className += ' ie-browser'; } var edge = ua.indexOf('Edge/'); if (edge > 0) { // IE 12 (aka Edge) => return version number var ieV = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); document.querySelector('body').className += ' ie-browser'; } // other browser return false; })(); // END: IE Detection // Initialze all functions $(window).on('scroll', function (){ //stickyBar(); }).on('load', function() { preLoader(); }); //Document ready functions $(document).ready(function () { backTotop(); var swiper = new Swiper(".mySwiper", { autoplay: { delay: 3000, }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, }); swiper.on("slideChange", function () { $(".btn-step") .removeClass("active") .eq(swiper.activeIndex) .addClass("active"); }); $(".btn-step").click(function (e) { e.preventDefault(); var $id = $(this).attr("data-id"); swiper.slideTo($id, 1000, false); }); $(window).scroll(function () { if ($(window).scrollTop() > 150) { $(".fixed-right").addClass("scrolled"); } else { $(".fixed-right").removeClass("scrolled"); } }); }); })(jQuery);