I have used get() to retrieve the first select drop down on the page like so:
styleSelect = jQuery('select').get(0);
And I can do normal things like
jQuery(styleSelect).remove();
To remove the select, but I’m having trouble finding the correct syntax to get the currently selected option’s text. I’ve tried:
jQuery(styleSelect, ':selected').text();
and several variations of this, I think I’m just missing something dumb here.
Use first the selector, then the context:
matchew’s suggestion will work too but only when you didn’t set the value-attributes of the
<option>‘s(If you set the value-attributes you will get the value of the selected option instead of the text)