186
rated 0 times
[
188]
[
2]
/ answers: 1 / hits: 19577
/ 9 Years ago, sun, november 29, 2015, 12:00:00
$(document).ready(function() {
var element;
$(.form-element).on(mousedown, function(event){
element = $('<form><select name=dropdown><option>Select...</option><option value=new-dropdown>add new...</option><option value=machine3>Machine 3</option><option value=machine4>Machine 4</option></select></form>');
$(#body-div).append(element);
});
});
The items in the list currently are just there for testing. But I need to be able to click on an add new option and add a new list item.
More From » jquery