Last active
April 4, 2017 19:03
-
-
Save noahub/d9f2513d128d9ccb7e76 to your computer and use it in GitHub Desktop.
Animate a page element on load.
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
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css"> | |
<script> | |
//The page element that will be animated on page load. | |
var yourElement = "#lp-pom-image-54"; | |
//The effect that will be applied to your page element. See https://daneden.github.io/animate.css/ for full list. | |
var yourEffect = "slideInUp"; | |
var effectClass = "animated " + yourEffect; | |
$( document ).ready(function() { | |
$(yourElement).show().addClass(effectClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ | |
$(this).removeClass(); | |
}); | |
}); | |
/** | |
* Do not remove this section; it allows our team to troubleshoot and track feature adoption. | |
* TS:0002-03-028 | |
*/ | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment