Skip to content

Instantly share code, notes, and snippets.

@blaja blaja/.js
Created Aug 4, 2015

Embed
What would you like to do?
document.getElementById('btn').addEventListener('click', function() {
"use strict";
const evens = Array.from(document.getElementsByClassName('even'));
for(let even of evens) {
even.classList.toggle('bold');
even.nextElementSibling.classList.toggle('italic');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.