What\'s the easiest way to add an option to a dropdown using jQuery?
option
Will this work?
$(\"#mySelect\").append(\'My
You can add option using following syntax, Also you can visit to way handle option in jQuery for more details.
$('#select').append($('', {value:1, text:'One'})); $('#select').append('One'); var option = new Option(text, value); $('#select').append($(option));
$('#select').append($('', {value:1, text:'One'}));
$('#select').append('One');
var option = new Option(text, value); $('#select').append($(option));