Skip to content

Instantly share code, notes, and snippets.

@ramzesimus
Last active August 29, 2015 13:56
Show Gist options
  • Save ramzesimus/8796097 to your computer and use it in GitHub Desktop.
Save ramzesimus/8796097 to your computer and use it in GitHub Desktop.
// 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