I have the below functions in regular JavaScript creating select options. Is there a way I can do this with jQuery without having to use the form object? Perhaps storing the
A really simple way to do this...
// create the option var opt = $("").val("myvalue").text("my text"); //append option to the select element $(#my-select).append(opt);
This could be done in lots of ways, even in a single line if really you want to.