So for example I can do this:
document.getElementById('element').onclick = function() {
document.getElementById('element').style.color = '#FFFFFF';
}
But how should I do this?
document.getElementById('element').onclick = function() {
document.getElementById('element').style.-moz-box-shadow = '1px 1px 1px #000';
}
I hope you get what I mean 🙂
Please do not post any answer related with jQuery or any library, I want it in plain javascript.
I believe it’s:
It doesn’t follow the “typical” formatting of a style object (which would lower-case the “M”) because of the initial “-” character. Converting between style properties and JS properties for those styles means:
Thus, “-moz-box-shadow” becomes: