Google
Edit File: main.js
/* Template Name: Exhibit - Conference & Event HTML Template Author: Themewinter Author URI: https://themeforest.net/user/themewinter Description: Exhibit - Conference & Event HTML Template Version: 1.0 ===================== table of content ==================== 1. menu toogle 2. event counter 3. funfact 4. isotope grid 5. main slider 6. speaker popup 7. gallery 8. video popup 9. hero area image animation 10. wow animated 11. back to top */ jQuery(function ($) { /**------------------------------------------------- *Testimonial Slider *----------------------------------------------------**/ $('.testimonial-slider').owlCarousel({ loop:true, autoplay: true, margin:10, items: 2, dots: false, nav: true, navText: [ '<i class="icon-chevron-left"></i>', '<i class="icon-chevron-right"></i>' ], autoplaySpeed: 1000, navSpeed: 1000, responsive:{ 0:{ items:1, nav:false }, 767:{ items:1, nav:true }, 1200: { item: 2 } } }); /**------------------------------------------------- *Testimonial Slider *----------------------------------------------------**/ $('.single-item-carousel').owlCarousel({ loop:true, autoplay: true, margin:10, items: 1, dots: true, nav: false, autoplaySpeed: 1000, navSpeed: 1000, responsive:{ 0:{ items:1, nav:false }, 767:{ items:1, nav:false }, 1200: { item: 1 } } }); /**------------------------------------------------- *event-execute Slider *----------------------------------------------------**/ $('.partner-brands-slider').owlCarousel({ loop:true, autoplay: true, margin:10, items: 6, dots: false, nav: false, navText: [ '<i class="icon-chevron-left"></i>', '<i class="icon-chevron-right"></i>' ], autoplaySpeed: 1000, navSpeed: 1000, responsive:{ 0:{ items:2, nav:false }, 767:{ items:4, nav:false }, 1200: { item: 4 } } }); /**------------------------------------------------- *event-execute Slider *----------------------------------------------------**/ $('.event-execute-slider').owlCarousel({ loop:true, autoplay: true, margin:10, items: 6, dots: false, nav: false, navText: [ '<i class="icon-chevron-left"></i>', '<i class="icon-chevron-right"></i>' ], autoplaySpeed: 1000, navSpeed: 1000, responsive:{ 0:{ items:2, nav:false }, 767:{ items:3, nav:false }, 1200: { item: 4 } } }); /**------------------------------------------------- *event-execute Slider *----------------------------------------------------**/ $('.clients-slider').owlCarousel({ loop:true, autoplay: true, margin:10, items: 3, dots: false, nav: false, navText: [ '<i class="icon-chevron-left"></i>', '<i class="icon-chevron-right"></i>' ], autoplaySpeed: 1000, navSpeed: 1000, responsive:{ 0:{ items:2, nav:false }, 767:{ items:3, nav:false }, 1200: { item: 3 } } }); /**------------------------------------------------- *Fixed HEader *----------------------------------------------------**/ $(window).on('scroll', function () { /**Fixed header**/ if ($(window).scrollTop() > 250) { $('.header').addClass('sticky fade_down_effect'); } else { $('.header').removeClass('sticky fade_down_effect'); } }); /* --------------------------------------------- Menu Toggle ------------------------------------------------ */ if ($(window).width() < 991) { $(".navbar-nav li a").on("click", function () { $(this).parent("li").find(".dropdown-menu").slideToggle(); $(this).find("i").toggleClass("fa-angle-up fa-angle-down"); }); } // // /* ----------------------------------------------------------- */ /* Event counter /* -----------------------------------------------------------*/ if ($('.countdown').length > 0) { $(".countdown").jCounter({ date: '21 October 2020 12:00:00', fallback: function () { console.log("count finished!") } }); } /*========================================================== funfact ======================================================================*/ var skl = true; $('.ts-funfact').appear(); $('.ts-funfact').on('appear', function () { if (skl) { $('.counterUp').each(function () { var $this = $(this); jQuery({ Counter: 0 }).animate({ Counter: $this.attr('data-counter') }, { duration: 8000, easing: 'swing', step: function () { var num = Math.ceil(this.Counter).toString(); if (Number(num) > 999999) { while (/(\d+)(\d{3})/.test(num)) { num = num.replace(/(\d+)(\d{3})/, '10M'); } } $this.html(num); } }); }); skl = false; } }); /*===================== isotop grid ========================*/ if ($('.grid').length > 0) { var $portfolioGrid = $('.grid'), colWidth = function () { var w = $portfolioGrid.width(), columnNum = 1, columnWidth = 0; if (w > 1200) { columnNum = 3; } else if (w > 900) { columnNum = 3; } else if (w > 600) { columnNum = 2; } else if (w > 450) { columnNum = 2; } else if (w > 385) { columnNum = 1; } columnWidth = Math.floor(w / columnNum); $portfolioGrid.find('.grid-item').each(function () { var $item = $(this), multiplier_w = $item.attr('class').match(/grid-item-w(\d)/), multiplier_h = $item.attr('class').match(/grid-item-h(\d)/), width = multiplier_w ? columnWidth * multiplier_w[1] : columnWidth, height = multiplier_h ? columnWidth * multiplier_h[1] * 0.4 - 12 : columnWidth * 0.3; $item.css({ width: width, //height: height }); }); return columnWidth; }, isotope = function () { $portfolioGrid.isotope({ resizable: true, itemSelector: '.grid-item', masonry: { columnWidth: colWidth(), gutterWidth: 3 } }); }; isotope(); $(window).resize(isotope); } // End is_exists /*========================================================== main slider ======================================================================*/ if ($('.main-slider').length > 0) { var bannerSlider = $(".main-slider"); bannerSlider.owlCarousel({ items: 1, mouseDrag: true, loop: true, touchDrag: true, autoplay:true, dots: true, autoplayTimeout: 5000, animateOut: 'fadeOut', autoplayHoverPause: true, smartSpeed: 250, }); } /*============================================================= speaker popup =========================================================================*/ $('.ts-image-popup').magnificPopup({ type: 'inline', closeOnContentClick: false, midClick: true, callbacks: { beforeOpen: function () { this.st.mainClass = this.st.el.attr('data-effect'); } }, zoom: { enabled: true, duration: 500, // don't foget to change the duration also in CSS }, mainClass: 'mfp-fade', }); /*============================================================= gallery =========================================================================*/ $('.ts-popup').magnificPopup({ type: 'image', closeOnContentClick: false, midClick: true, callbacks: { beforeOpen: function () { this.st.mainClass = this.st.el.attr('data-effect'); } }, zoom: { enabled: true, duration: 500, // don't foget to change the duration also in CSS }, mainClass: 'mfp-fade', }); /*============================================================= video popup =========================================================================*/ $('.ts-video-popup').magnificPopup({ type: 'iframe', closeOnContentClick: false, midClick: true, callbacks: { beforeOpen: function () { this.st.mainClass = this.st.el.attr('data-effect'); } }, zoom: { enabled: true, duration: 500, // don't foget to change the duration also in CSS }, mainClass: 'mfp-fade', }); /*============================================================= hero image animation =========================================================================*/ $('.tile') // tile mouse actions .on('mouseover', function () { $(this).children('.photo').css({ 'transform': 'scale(' + $(this).attr('data-scale') + ')' }); }) .on('mouseout', function () { $(this).children('.photo').css({ 'transform': 'scale(1)' }); }) .on('mousemove', function (e) { $(this).children('.photo').css({ 'transform-origin': ((e.pageX - $(this).offset().left) / $(this).width()) * 100 + '% ' + ((e.pageY - $(this).offset().top) / $(this).height()) * 100 + '%' }); }) // tiles set up .each(function () { $(this) // add a photo container .append('<div class="photo"></div>') // some text just to show zoom level on current item in this example //.append('<div class="txt"><div class="x">'+ $(this).attr('data-scale') +'x</div>ZOOM ON<br>HOVER</div>') // set up a background image for each tile based on data-image attribute .children('.photo').css({ 'background-image': 'url(' + $(this).attr('data-image') + ')' }); }); /*========================================================== wow animated ======================================================================*/ var wow = new WOW({ animateClass: 'animated', mobile: false }); wow.init(); /* ----------------------------------------------------------- */ /* Back to top /* ----------------------------------------------------------- */ $(window).on('scroll', function () { if ($(window).scrollTop() > $(window).height()) { $(".BackTo").fadeIn('slow'); } else { $(".BackTo").fadeOut('slow'); } }); $("body, html").on("click", ".BackTo", function (e) { e.preventDefault(); $('html, body').animate({ scrollTop: 0 }, 800); }); // scrollme.init(); $(".scrollSection").click(function() { $('html,body').animate({ scrollTop: $(".aboutScrollSection").offset().top}, 800); }); }); $(document).ready(function () { $(".jsAdded").click(function (){ $(this).find(".nav-item").addClass("active").siblings().removeClass("active"); }); });