Been trying to work this out for a little while now, no luck.
jQuery("#choosenCause option:selected").removeAttr("selected","selected");
jQuery('#choosenCause option[value="'+json.causeID+'"]').attr("selected",true);
I’m using the above, it adds selected="selected" to the right element, but does not change the selected element that the user sees.
Full JS here – http://inspire.simplyfundraising.co.uk/wp-content/themes/inspire/assets/js/promojs.js
To set the selected option of a
selectelement, useval():