Created
October 18, 2018 06:29
-
-
Save Faizanq/f9647cba5f210df2cfb374649e03c8ca to your computer and use it in GitHub Desktop.
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
$('#mySelect2') | |
.empty() //empty select | |
.append($("<option/>") //add option tag in select | |
.val("20") //set value for option to post it | |
.text("nabi")) //set a text for show in select | |
.val("20") //select option of select2 | |
.trigger("change"); //apply to select2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment