Created
April 29, 2014 14:21
-
-
Save stevelippert/11401828 to your computer and use it in GitHub Desktop.
Adding options to a select list in jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("#yourIDHERE").append('<option value="something">Your text here</option>'); | |
| $("#yourIDHERE").append( $("<option/>", {value: "something", text: "Your text here"}) ); | |
| $("#yourIDHERE").append('<option value="gte">≥</option>'); | |
| $("#yourIDHERE").append( $("<option/>", {value: "gte", html: "≥"}) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment