Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // js/index.js
- const animateBtn = document.getElementById( 'animate' );
- animateBtn.addEventListener( 'click', function() {
- creeper.toggleAnimate();
- });
- // css/index.css
- button#animate {
- z-index: 10;
- position: absolute;
- }
- <!-- index.html -->
- <body>
- <button type="button" id="animate">Animate</button>
- <!-- ... -->
- </body>
- <!-- ... -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement