Last active
December 8, 2019 03:01
-
-
Save neodigm/20e8667064562688ee9c0befce969c96 to your computer and use it in GitHub Desktop.
Toggle brand
This file contains 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
// JavaScript | |
[].slice.call( document.querySelectorAll(".js-mybutton") ).filter( function( _e ){ | |
_e.addEventListener("click", function( e ){ | |
document.body.dataset.brand = ( document.body.dataset.brand == "LS" ) ? "LTD" : "FF"; | |
}, true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment