Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery UI selectmenu not a function

I'm trying to style an HTML select menu with JQuery UI; but it simply isn't working. Here is a JSFiddle. Below are stripped down examples of what I'm trying to accomplish.

Here's my HTML code:

<form action="#">
    <fieldset>
        <label for="parameterSelectMenu">Select a Parameter</label>
        <select name="parameterSelectMenu" id="parameterSelectMenu">
            <option value="volvo">Temperature Actual</option>
        </select>
    </fieldset>
</form>
<!-- A button to show JQuery is working... -->
<button id="clicker">A button element</button>

Here's the JavaScript:

$("#clicker").button();
$("#parameterSelectMenu").selectmenu();

In Firefox "selectmenu" is reported as not a function...

like image 532
Vance T Avatar asked Jul 03 '14 13:07

Vance T


1 Answers

Updated FIDDLE The problem is that you are using older version of jquery-ui in jsfiddle demo you have created which does not have support for the selectmenu plugin.

so you have to add the latest version plugin files as shown below:

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
like image 172
Rahul Gupta Avatar answered Oct 11 '22 09:10

Rahul Gupta