Does anyone know of a technique to programmatically create an HTML select list including options using JQuery?
var arr = [ {val : 1, text: 'One'}, {val : 2, text: 'Two'}, {val : 3, text: 'Three'} ]; var sel = $('').appendTo('body'); $(arr).each(function() { sel.append($("").attr('value',this.val).text(this.text)); });