water.css/script.js
2019-04-05 22:05:48 -07:00

8 lines
No EOL
300 B
JavaScript

document.getElementById('switch').addEventListener('click', () => {
const css = document.getElementById('watercss');
if (css.getAttribute('href') == 'dist/water-dark.css') {
css.setAttribute('href', 'dist/water-light.css')
} else {
css.setAttribute('href', 'dist/water-dark.css')
}
})