Advertisement
deliciousthemes

Untitled

Apr 16th, 2014
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  /* ==============================================
  2. //Elements animation
  3. =============================================== */     
  4. jQuery(document).ready(function($) {
  5.    
  6.     'use strict';
  7.     if(!( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) {
  8.     $('.animated').appear(function() {
  9.         var elem = $(this);
  10.         var animation = elem.data('animation');
  11.         if ( !elem.hasClass('visible') ) {
  12.             var animationDelay = elem.data('animation-delay');
  13.             if ( animationDelay ) {
  14.  
  15.                 setTimeout(function(){
  16.                     elem.addClass( animation + " visible" );
  17.                     elem.removeClass('hiding');
  18.                     if (elem.hasClass('counter')) {
  19.                       elem.children('.value').countTo();
  20.                     }
  21.                 }, animationDelay);
  22.  
  23.             } else {
  24.                 elem.addClass( animation + " visible" );
  25.                 elem.removeClass('hiding');
  26.                 if (elem.hasClass('counter')) {
  27.                   elem.children('.value').countTo();
  28.                 }
  29.             }
  30.         }
  31.     },{accY: -150});
  32.     }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement