Articles
Snippets
Categories
Quiz
Encryption
Base64 Encode
Base64 Decode
MD5 Hash
SHA1 Hash
SHA256 Hash
SHA512 Hash
URL Encode
URL Decode
Tools
Password generator
IP Locator
Website Down Detector
Character count
Json Formatter
JavaScript Formatter
HTML Formatter
CSS Formatter
Convert
XML to Json
Json to XML
Works with Us
Animate.css example with Javascript code
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Animate.css</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> </head> <body> <div class="text-center mt-5"> <h1 class="header animate__animated">I am dancing!</h1> <button class="btn btn-primary">Animate</button> </div> <script type="text/javascript"> </script> </body> </html>
CSS
Javascript
document.querySelector('.btn-primary').addEventListener('click', function() { const elem = document.querySelector('.header'); elem.classList.add('animate__bounce'); setTimeout(function() { const elem = document.querySelector('.header'); elem.classList.remove('animate__bounce'); }, 1000); });
Run Code
Copyright 2022 HackTheStuff