/* * Themez Kitchen * ----------------------------------------------------------- * @package Themez Kitchen - Premium Multipurpose WordPress Theme * @subpackage ThemezKitchen * @copyright Copyright (c), ThemezKitchen, (http://www.themezkitchen.com/) * @link http://www.themezkitchen.com/ * @version 1.0.0 * @since Version 1.0.0 */ function onScrollInit( items, trigger ) { items.each( function() { var osElement = jQuery(this), osAnimationClass = osElement.attr('data-wk-animation'), osAnimationDelay = osElement.attr('data-wk-animation-delay'); osAnimationDuration = osElement.attr('data-wk-animation-duration'); osElement.css({ '-webkit-animation-delay': osAnimationDelay, '-moz-animation-delay': osAnimationDelay, 'animation-delay': osAnimationDelay, '-webkit-animation-duration': osAnimationDuration, 'animation-duration': osAnimationDuration, }); var osTrigger = ( trigger ) ? trigger : osElement; osTrigger.waypoint(function() { osElement.addClass('animated').addClass(osAnimationClass); },{ triggerOnce: true, offset: '90%' }); }); } jQuery(document).ready(function ($) { // Notice for developers: Inside of this function, $() will work as an alias for jQuery() // and other libraries also using $ will not be accessible under this shortcut // ADD CLASS ON HEADER $(window).bind('scroll', function(e) { var offsetTop = $(window).scrollTop(); if(offsetTop > 100) { $('.navbar-wk').addClass('scroll-header'); } else { $('.navbar-wk').removeClass('scroll-header'); } }); //init animation onScrollInit( jQuery('.animate-element') ); $('.btn-open-close').click(function(e){ $(this).toggleClass('active-search'); $(this).children('i').toggleClass('fa-close'); $('#bigsearchform').toggleClass('big-search-fixed'); $('#bs, #bigsearchsubmit').toggle(); $('.search-b-overlay').fadeToggle( "fast", "linear" ); $('#bs').focus(); }); $('.wk-share-icons a, .wk-share-side-icons a').click(function(e){ e.preventDefault(); var uri = $(this).data('href'); window.open(uri); }); $('.comment-on-close').click(function(e) { e.preventDefault(); var toclose = $(this).data('target'); $('#'+toclose+'').slideToggle(); }); $('.author-display').click(function(e) { e.preventDefault(); $('.author-menu-display').slideToggle(); }); $('.author-collapse').animate({ paddingTop: "150px", paddingBottom: "150px", }, 500); $('.tagcloud a').addClass('primary-bg'); });