I am using jquery mobile latest version. I have a select field that actually look like this:
<select id="make">
</select>
I want to dynamically added option on it.So I use this code :
var makeArr = new Array(1, 2, 3, 4, 5);
var parent = $('#make');
$.each(makeArr, function(i, item){
parent.append('<option value="' + item + '">' + item + '</option>');
});
I have also use parent.append('<option value="' + item + '">' + item + '</option>').trigger('create'); but nothing change.
I have added <li> under <ul> by this way.But this is not working here.
try
after inserting dynamic content.