Say I have a select input with 10 options and the id "myselect". How can I, on page load or basically as early as possible so that it seems as if it loaded this way, check which option is selected in "myselect" and add a css class to the parent, parent div that the select is in?
The second part of this question is, if you change the select after the page loads what is the best way to change the css class accordingly? Would it be best to just add a second javascript bit that uses something like onclick rather than onload?