Chandra
Chandra

Reputation: 777

jQuery; How to call a function inside widget?

I am using following jquery widget http://quasipartikel.at/multiselect/

I want to dynamically add options, by calling addOptions inside the following js. https://github.com/michael/multiselect/blob/next/js/ui.multiselect.js

So I tried

<script type="text/javascript">
function launchExtraOption(){
 var selectValues = new Object();
 selectValues['Abcd'] = 'Abcd';
 $("#countries").multiselect(function(){
  addOptions(selectValues);
 });
}
</script>

But I dont seem to be getting it to work. Can somebody help?

Upvotes: 0

Views: 1856

Answers (1)

Shlomi Komemi
Shlomi Komemi

Reputation: 5545

taken from: http://quasipartikel.at/multiselect_next/

.multiselect( 'option', optionName, [value] )

Get or set any dialog option. If no value is specified, will act as a getter.

Upvotes: 1

Related Questions