/home/simp499cl/public_html/js
NameSizeModeActions
script.js30550644editdlrm
Edit: /home/simp499cl/public_html/js/script.js (3055B)
/** * WEBSITE: https://themefisher.com * TWITTER: https://twitter.com/themefisher * FACEBOOK: https://www.facebook.com/themefisher * GITHUB: https://github.com/themefisher/ */ $(document).ready(function () { 'use strict'; // navbarDropdown if ($(window).width() < 992) { $('.navigation .dropdown-toggle').on('click', function () { $(this).siblings('.dropdown-menu').animate({ height: 'toggle' }, 300); }); } $(window).on('scroll', function () { //.Scroll to top show/hide if ($('#scroll-to-top').length) { var scrollToTop = $('#scroll-to-top'), scroll = $(window).scrollTop(); if (scroll >= 200) { scrollToTop.fadeIn(200); } else { scrollToTop.fadeOut(100); } } }); // scroll-to-top if ($('#scroll-to-top').length) { $('#scroll-to-top').on('click', function () { $('body,html').animate({ scrollTop: 0 }, 600); return false; }); } // Shuffle js filter and masonry var containerEl = document.querySelector('.shuffle-wrapper'); if (containerEl) { var Shuffle = window.Shuffle; var myShuffle = new Shuffle(document.querySelector('.shuffle-wrapper'), { itemSelector: '.shuffle-item', buffer: 1 }); jQuery('input[name="shuffle-filter"]').on('change', function (evt) { var input = evt.currentTarget; if (input.checked) { myShuffle.filter(input.value); } }); } $('.portfolio-single-slider').slick({ infinite: true, arrows: false, autoplay: true, autoplaySpeed: 2000 }); $('.clients-logo').slick({ infinite: true, arrows: false, autoplay: true, autoplaySpeed: 2000 }); $('.testimonial-slider').slick({ slidesToShow: 1, infinite: true, arrows: false, autoplay: true, autoplaySpeed: 2000 }); // CountDown JS var countDownEl = $('.count-down'); if (countDownEl) { $('.count-down').syotimer({ year: 2021, month: 5, day: 9, hour: 20, minute: 30 }); } // Magnific Popup Image $('.portfolio-popup').magnificPopup({ type: 'image', removalDelay: 160, //delay removal by X to allow out-animation callbacks: { beforeOpen: function () { // just a hack that adds mfp-anim class to markup this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); this.st.mainClass = this.st.el.attr('data-effect'); } }, closeOnContentClick: true, midClick: true, fixedContentPos: true, fixedBgPos: true }); // Count Up function counter() { var oTop; if ($('.count').length !== 0) { oTop = $('.count').offset().top - window.innerHeight; } if ($(window).scrollTop() > oTop) { $('.count').each(function () { var $this = $(this), countTo = $this.attr('data-count'); $({ countNum: $this.text() }).animate({ countNum: countTo }, { duration: 1000, easing: 'swing', step: function () { $this.text(Math.floor(this.countNum)); }, complete: function () { $this.text(this.countNum); } }); }); } } $(window).on('scroll', function () { counter(); }); });