Skip to content

Instantly share code, notes, and snippets.

@Hollyw00d
Last active May 10, 2020 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hollyw00d/6bd02419c8f24f6e5256a3fd7c337deb to your computer and use it in GitHub Desktop.
Save Hollyw00d/6bd02419c8f24f6e5256a3fd7c337deb to your computer and use it in GitHub Desktop.
ESJS Events Agenda Page Code Sample
<!-- HTML -->
<a href="#" id="link">My Kewl Link</a>
/* CSS */
#link {
color: green;
text-decoration: none;
}
.active-blue {
color: blue !important;
text-decoration: underline !important;
}
// JS
var link = document.getElementById('link');
link.addEventListener('click', function(e) {
e.preventDefault();
this.classList.toggle('active-blue');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment