I have the following markup on page load:
<select name="sel_billing_address"></select>
After page load that select is then populated by some AJAX to be something along the lines of:
<select name="sel_billing_address">
<option value="1">hi</option>
<option value="2">there</option>
<option value="3" selected="selected">sally</option>
</select>
I need to grab the selected option from this list. Normally it's just a simple case of:
jQuery('select[name=sel_billing_address] option:selected');
but because it's loaded dynamically, I need to monitor it using .live() - or by some other means. If I monitor it using live('change') then it works great - but I need the values when the select box might not have been changed.
.live('load') seems like the obvious choice, but that only works when loading the element - the select element itself is loaded on page load, at which point it's empty. I have also tried doing .live('load') on the OPTION rather than the SELECT, but that doesn't seem to be available either.
It's also worth noting that I cannot change the markup, how the page loads elements, and I can't plug into the callback parameter of the script that originally changes the select - everything is external.
Any help is greatly appreciated.