I am populating a select field using JQuery on page load using this method
$('#select').append('<option value="' + result + '">' + result + '</option>');
However this leaves the select box 'blank', i.e the first value in the options list is not preselected as the selected option.
How do I 'refresh' this list so that the first value is preselected?
Sorry - should have said it was JQuery mobile before
Thank you.
This question is related to
jquery
select
jquery-mobile
option
Source: Stackoverflow.com