On my jQuery Mobile website I would like to give the user the possibility to add select menus on click. The additional select menus appear, but do not work. No options are shown when the select menus are being clicked.
Here comes my code:
JSFiddle: http://jsfiddle.net/nCs6U/82/
HTML:
<div id="select-con">
<div class="select-row">
<form class="select-form">
<select class="select-class" name="select-name"
data-native-menu="false">
<option value="0" data-placeholder="Choose">Choose</option>
<option value="1">Option 1</option>
<option value="2" selected="selected">Option 2</option>
<option value="3">Option 3</option>
</select>
</form>
</div>
<!-- raw select menu for adding -->
<div id="select-row-raw" class="select-row">
<form class="select-form">
<select class="select-class" name="select-name"
data-native-menu="false">
<option value="0" data-placeholder="Choose">Choose</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</form>
</div>
</div>
<button>Add Select</button>
JS:
$('button').on('click', function() {
$clone = $('#select-row-raw').clone();
$clone.appendTo('#select-con').show();
});
How do I achieve that the added select menus (clones of "#select-row-raw") work?
* UPDATE *
New fiddle: jsfiddle.net/nCs6U/85
The weird thing is that for the first added select menu the display of options still does not work. How can this problem be solved?