0
votes

I am trying to refresh a 'select menu' with code below using jQuery 1.64 (I need to use this version though it doesn't seem to matter which version I use). When I try to run the selectmenu() function I get the following error.

Error:

Uncaught TypeError: undefined is not a function (index):22(anonymous function) 
jQuery.event.dispatch jquery-git2.js:4402elemData.handle

Fiddle: http://jsfiddle.net/DNaFv/

html

<select id="test">
   <option value="1">1</option>
   <option value="2">2</option>
   <option value="3">3</option>
</select>

jQuery:

$("#test").selectmenu("refresh");

1
There is no jQuery method called "selectmenu". You're not importing jQueryUI. - Pointy
selectmenu is not a standard jQuery method. I'm guessing you need to include a plugin library. - Rory McCrossan

1 Answers

1
votes

.selectmenu is part of the jQuery UI library. Once you include jQuery UI's dependencies, use .selectmenu as follows:

$("#test").selectmenu();