URGENT HELP NEEDED : How to access the source list for the allowed values?
gitcostan opened this issue · 2 comments
gitcostan commented
hello,
my tag is as shown below.
$('#tokenfield').tokenfield({ autocomplete: { source: ['red','blue','green','yellow','violet','brown','purple','black','white'], delay: 100 }, showAutocompleteOnFocus: true })
now how can i access this list of source items? in another button click i want to print all the value from the source array coded above? so that i get back - source: ['red','blue','green','yellow','violet','brown','purple','black','white'],
many thanks in advance !
hrobertson commented
var mySource = ['red','blue','green','yellow','violet','brown','purple','black','white'];
$('#tokenfield').tokenfield({ autocomplete: { source: mySource, delay: 100 }, showAutocompleteOnFocus: true })
$('button').on('click', function (event) { alert(mySource); });
gitcostan commented
Thanks a million !!