What\'s the easiest way to add an option to a dropdown using jQuery?
option
Will this work?
$(\"#mySelect\").append(\'My
If you want to insert the new option at a specific index in the select:
$("#my_select option").eq(2).before($('', { value: 'New Item', text: 'New Item' }));
This will insert the "New Item" as the 3rd item in the select.