/** * Exoplanet Custom JS * * @package Exoplanet * * Distributed under the MIT license - http://opensource.org/licenses/MIT */ jQuery(function($){ "use strict"; jQuery('.menu > ul').superfish({ delay: 500, animation: {opacity:'show',height:'show'}, speed: 'fast' }); jQuery('.search-box span i').click(function(){ jQuery(".serach_outer").toggle(); }); }); /* Mobile responsive Menu*/ function openNav() { document.getElementById("mySidenav").style.width = "250px"; } function closeNav() { document.getElementById("mySidenav").style.width = "0"; } jQuery(function() { //----- OPEN jQuery('[data-popup-open]').on('click', function(e) { var targeted_popup_class = jQuery(this).attr('data-popup-open'); jQuery('[data-popup="' + targeted_popup_class + '"]').fadeIn(350); e.preventDefault(); }); //----- CLOSE jQuery('[data-popup-close]').on('click', function(e) { var targeted_popup_class = jQuery(this).attr('data-popup-close'); jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350); e.preventDefault(); }); }); jQuery('document').ready(function(){ var owl = jQuery('#paint_cat_one .owl-carousel'); owl.owlCarousel({ margin: 5, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: true, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 4 } }, autoplayHoverPause : true, mouseDrag: true }); var owl = jQuery('#paint_cat_two .owl-carousel'); owl.owlCarousel({ margin: 5, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: true, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } }, autoplayHoverPause : true, mouseDrag: true }); var owl = jQuery('#paint_cat_three .owl-carousel'); owl.owlCarousel({ margin: 5, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: true, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 4 } }, autoplayHoverPause : true, mouseDrag: true }); var owl = jQuery('#paint_cat_four .owl-carousel'); owl.owlCarousel({ margin: 5, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: true, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } }, autoplayHoverPause : true, mouseDrag: true }); var owl = jQuery('#paint_cat_five .owl-carousel'); owl.owlCarousel({ margin: 5, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: true, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 4 } }, autoplayHoverPause : true, mouseDrag: true }); var owl = jQuery('#information .owl-carousel'); owl.owlCarousel({ margin: 10, nav: true, autoplay : true, lazyLoad: true, autoplayTimeout: 3000, loop: false, navText : ['',''], responsive: { 0: { items: 1 }, 600: { items: 2 }, 1000: { items: 4 } }, autoplayHoverPause : true, mouseDrag: true }); jQuery('a.accordion-toggle').click(function() { jQuery("i", this).toggleClass("fas fa-plus fas fa-times"); }); jQuery("#our_skills .progress-bar").loading(); jQuery('#our_skills input').on('click', function () { jQuery("#our_skills .progress-bar").loading(); }); }); /* Counter */ jQuery(document).ready(function(){ jQuery('.count').each(function () { jQuery(this).prop('Counter',0).animate({ Counter: jQuery(this).text() }, { duration: 30000, easing: 'swing', step: function (now) { jQuery(this).text(Math.ceil(now)); } }); }); }); jQuery(function($){ $(window).scroll(function(){ var scrollTop = $(window).scrollTop(); if( scrollTop > 100 ){ $('#masthead').addClass('scrolled'); }else{ $('#masthead').removeClass('scrolled'); } $('.main-header').css('background-position', 'center ' + (scrollTop / 2) + 'px'); }); }); // custom Animation jQuery(window).scroll(function() { jQuery('.work_inner').each(function(){ var imagePos = jQuery(this).offset().top; var topOfWindow = jQuery(window).scrollTop(); if (imagePos < topOfWindow+400) { jQuery(this).addClass("fadeInRight"); } }); jQuery('#about .container').each(function(){ var imagePos = jQuery(this).offset().top; var topOfWindow = jQuery(window).scrollTop(); if (imagePos < topOfWindow+400) { jQuery(this).addClass("fadeInLeft"); } }); });