javascript - Select2: Emptying and loading changed array data, loads old data -


first loaded array data by:

$("#foo").select2({ data: example }); 

then changed array "example" , wanted change select by:

$("#foo").empty(); $("#foo").select2({ data: example }); 

but old select showed up. idea why?

edit: array wasnt updated caused error.


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -