I'm trying to change the background color of the current selected option of a Select. Seems simple enough using
$("#selection option:selected").css("background-color", "pink");
in jQuery onLoad. Only problem is that you cannot see the pink option until you click on the select.
I need it so that the current option is highlighted onLoad for my form.
$("#selection").css("background-color", "pink");
does achieve this, but then it highlights all other options in the select too.
https://jsfiddle.net/0h3c54Lw/1/ is an example to play around with. Are there any non-hacks to achieve this?