Using DOM Elements Creator plugin (my favorite):
$.create('option', {'value': 'val'}, 'myText').appendTo('#mySelect'); UsingIf you don't have to support old IE versions, using the Option constructorOption constructor is clearly the way to go, (not sure about browser support)a readable and efficient solution:
$(new Option('myText', 'val')).appendTo('#mySelect'); Using document.createElement (avoiding extra work parsing HTML with $("<option></option>"))It's equivalent in functionality to, but cleaner than:
$('#mySelect').append($(document.createElement("option")"<option></option>"). attr("value", "val").text("myText")).appendTo('#mySelect');