Does anyone know of a technique to programmatically create an HTML select list including options using JQuery?
If you have already list somewhere in DOM, reuse it and make it empty from previous user interactions...
// Call existing list, chain empty() var my_list = $("#my_list").empty(); // Build list $(my_arr).each(function() { my_list.append($(").attr(\'value\',this.item_id).text(this.item_name)); });