Just create the elements like any element.
Example:
var data = {
'foo': 'bar',
'foo2': 'baz'
}
var s = $('<select />');
for(var val in data) {
$('<option />', {value: val, text: data[val]}).appendTo(s);
}
s.appendTo('body'); // or wherever it should be
More Related Contents:
- jQuery validate: How to add a rule for regular expression validation?
- How to bind ‘touchstart’ and ‘click’ events but not respond to both?
- How do I catch an Ajax query post error?
- jQuery Validation Plugin – adding rules that apply to multiple fields
- jquery find versus context selection
- jquery get HTML 5 Data Attributes with hyphens and Case Sensitivity
- Fade in each element – one after another
- css width: calc(100% -100px); alternative using jquery
- Is there a version of $getJSON that doesn’t use a call back?
- How to set encoding in .getJSON jQuery
- How to fade changing background image
- What is the best way of showing progress on an Ajax call?
- jQuery resize function doesn’t work on page load
- jqGrid : issue loading nested sub grid with local datatype
- How do I force jQuery append to NOT automatically close a tag?
- Aptana Plugin for Eclipse and jQuery code assist
- click() event is calling twice in jQuery
- How can I tell if a particular CSS property is inherited with jQuery?
- jquery how to catch enter key and change event to tab
- Show Page Loading Spinner on Ajax Call in jQuery Mobile
- Data attribute value updated by jquery is not visible in DOM
- How can I find the closest previous sibling with class using jQuery?
- How to load a Google Maps map inside of a hidden element
- How to preview selected image in input type=”file” in popup using jQuery? [duplicate]
- Remove CSS “top” and “left” attributes with jQuery
- jQuery validator and datepicker click not validating
- jquery validation not waiting for remote validation to return true, considers form valid
- Selecting a jQuery Tab using a parameter in the URL
- Using jQuery’s $.ajax within an angularJS controller
- In-cell data bars in jqGrid – possible or not?