Last active
August 29, 2015 13:56
-
-
Save ramzesimus/8796097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ANIMATE CONTENT | |
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); | |
if (isMobile == false) { | |
$('*[data-animated]').addClass('animated'); | |
} | |
function animated_contents() { | |
$(".animated:appeared").each(function (i) { | |
var $this = $(this), | |
animated = $(this).data('animated'); | |
setTimeout(function () { | |
$this.addClass(animated); | |
},180); | |
}); | |
} | |
animated_contents(); | |
$(window).scroll(function () { | |
animated_contents(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment