Andreas Grech was pretty close… it’s actually this
(note the reference to this
instead of the item in the loop):
var $dropdown = $("#dropdown");
$.each(result, function() {
$dropdown.append($("<option />").val(this.ImageFolderID).text(this.Name));
});
More Related Contents:
- jQuery Adding new option to select element doesn't pick up the string [closed]
- jQuery get value of select onChange
- Why does the jquery change event not trigger when I set the value of a select using val()?
- Use jQuery to change a second select list based on the first select list option
- Click event on select option element in chrome
- Auto resizing the SELECT element according to selected OPTION’s width
- Best way to unselect a in jQuery?
- How to make the first option of selected with jQuery
- Selecting text on focus using jQuery not working in Safari and Chrome
- Populate Select box options on click with Javascript/Jquery with Json data
- Get index of selected option with jQuery
- Get SELECT’s value and text in jQuery [duplicate]
- Jquery- Get the value of first td in table
- Disable select options based on value *through the HTML only!*
- Unselect what was selected in an input with .select()
- jQuery onchange/onfocus select box to display an image?
- JQuery :contains function limit to exact match
- How to change the bootstrap css width into 1000px? [closed]
- How to fire loadComplete after new row is added in jqgrid?
- Detect image load
- Using jquery to get all checked checkboxes with a certain class name
- jQuery selector for the label of a checkbox
- How do I PUT data to Rails using JQuery
- Passing dynamic json object to C# MVC controller
- Highlight dates in specific range with jQuery’s datepicker
- bootstrap-typeahead.js add a listener on select event
- jQuery trigger custom event synchronously?
- JQuery.validate – one rule on blur only; the rest should be normal?
- While variable is not defined – wait
- What happens when no response is received for a request? I’m seeing retries