Advertisement
retesere20

example animation js

Feb 27th, 2020
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1.  
  2. <span class="animated bounceIn">hello</span>
  3. $('#your-id').animateCSS('fadeIn', {
  4. delay: 1000,
  5. callback: function(){
  6. console.log('Boom! Animation Complete');
  7. }
  8. });
  9.  
  10. function animationClick(element, animation, removeOrNot){
  11. $=jQuery;
  12. element = $(element);
  13. element.click(
  14. function() {
  15. element.addClass('animated ' + animation);
  16. //wait for animation to finish before removing classes
  17. if(removeOrNot){
  18. window.setTimeout( function(){
  19. element.removeClass('animated ' + animation);
  20. }, 2000);
  21. }
  22. }
  23. );
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement