How to replace select2 data array after initialization?

107 views
Skip to first unread message

thelin...@gmail.com

unread,
Sep 18, 2015, 4:36:33 PM9/18/15
to select2
$("#select").select2({data: new_data}) just appends more options

Jeff B.

unread,
Sep 22, 2015, 4:16:07 PM9/22/15
to select2, thelin...@gmail.com
http://stackoverflow.com/questions/32704589/select2-tags-not-working-with-json-url-single-select

If you take the tags: true line out this is how initialize my select2 boxes. You will in the data: area there is a .empty jQuery command to empty to select2 box before it pulls data. This post is for another problem, but, again, with that one line remove it is my fully functional select2 initialization code. the "n: n" is passing the current time forcing caching browsers, such as ie, to re-pull the server data every time instead of using cached data.
Reply all
Reply to author
Forward
0 new messages