Created
October 8, 2018 08:42
-
-
Save joelhinz/156e8242206473a46a68fa87be9b8165 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function (event) { | |
event.preventDefault(); | |
const activate = document.getElementById(this.dataset.activate); | |
const deactivate = document.getElementById(this.dataset.deactivate); | |
deactivate.classList.add('inactive'); | |
deactivate.classList.remove('active'); | |
setTimeout(() => { | |
deactivate.classList.add('hidden'); | |
activate.classList.remove('hidden'); | |
}, 350); | |
setTimeout(() => { | |
activate.classList.remove('inactive'); | |
activate.classList.add('active'); | |
}, 700); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment