I need to make the text uppercase on the selected option only in a <select>
. I found a working example using jQuery but I need to convert it to vanilla JS.
I've actually got it pretty close, when you choose an option, it makes the selected value uppercase. But when you choose another, it leaves the previous option uppercase also.
I can't figure out how to say "Capitalise all options EXCEPT the selected option, which I would like to be uppercase".
Any guidance will be appreciated.