Error when using jQuery UI Selectmenu plugin in IE

The jQuery UI Selectmenu plugin presented here: http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html

I have a couple of problems with this plugin. I will focus only on what happens only in IE.

I have html:

<label for="SearchState"></label> <select style="width: 160px" name="SearchState" id="SearchState"> <option>CT</option> <option>MA</option> <option>NH</option> </select> 

and jQuery:

 $('select#SearchState').selectmenu(); 

In Firefox, this works, however in IE I get an error while loading:

"Invalid argument" - jquery 1.4.2 Line: 4618

However, a new stylish selectmenu appears along with the original one (this is by design, but the original html selection menu should be hidden), but when I click the parameter, I get several of these errors:

"this._optionList" is null or not an object - ui.selectmenu.js String 400

Any ideas why this is not working in IE?

Lines 399-401 of ui.selectmenu.js

 _selectedOptionLi: function() { return this._optionLis.eq(this._selectedIndex()); }, 

Lines 4615-4622 of jquery-1.4.1.js

 name = name.replace(rdashAlpha, fcamelCase); if ( set ) { style[ name ] = value; } return style[ name ]; 
+7
source share
3 answers

I have confirmed this behavior. I recreated it in this jsfiddle . After upgrading jQuery to 1.7.2, he did not give these errors. This jsfiddle is a fixed version. Note that I also upgraded the jQuery UI (due to jsFiddle) to jQuery UI 1.8.18, but the problems lie in the jQuery version that you are using. I recommend upgrading to the latest (stable) version of jQuery and jQuery UI and selectmenu ( JavaScript and CSS ).

+3
source

You are using the old jQuery UI labs , and it looks like it hasn't worked for a while.

Take a look at this fork on github https://github.com/fnagel/jquery-ui .

JQuery UI plugin for promoting some plugins. Currently you will find: the latest version of Selectmenu (originally by thread group) and the available version of jQuery user interface tabs. Check the "Select branch" and "Tab availability" checkboxes

+1
source

If the demo you are connected to is working in IE, as a first step I will try to use the same version of selectmenu as the demo . If this works, you know that this is a problem with the plugin.

0
source

All Articles