jQuery(function($) {'use strict'; //Responsive Nav $('li.dropdown').find('.fa-angle-down').each(function(){ $(this).on('click', function(){ if( $(window).width() < 768 ) { $(this).parent().next().slideToggle(); } return false; }); }); //Initiat WOW JS new WOW().init(); // portfolio filter $(window).load(function(){ $('.main-slider').addClass('animate-in'); $('.preloader').remove(); //End Preloader if( $('.masonery_area').length ) { $('.masonery_area').masonry();//Masonry } var $portfolio_selectors = $('.portfolio-filter >li>a'); if($portfolio_selectors.length) { var $portfolio = $('.portfolio-items'); $portfolio.isotope({ itemSelector : '.portfolio-item', layoutMode : 'fitRows' }); $portfolio_selectors.on('click', function(){ $portfolio_selectors.removeClass('active'); $(this).addClass('active'); var selector = $(this).attr('data-filter'); $portfolio.isotope({ filter: selector }); return false; }); } }); $('.timer').each(count); function count(options) { var $this = $(this); options = $.extend({}, options || {}, $this.data('countToOptions') || {}); $this.countTo(options); } //Countdown $('#features').bind('inview', function(event, visible, visiblePartX, visiblePartY) { if (visible) { $(this).find('.timer').each(function () { var $this = $(this); $({ Counter: 0 }).animate({ Counter: $this.text() }, { duration: 2000, easing: 'swing', step: function () { $this.text(Math.ceil(this.Counter)); } }); }); $(this).unbind('inview'); } }); // Search $('.fa-search').on('click', function() { $('.field-toggle').fadeToggle(200); }); });