<link rel="stylesheet" type="text/css" href=".8.9/themes/ui-lightness/jquery-ui.css" />
<script type="text/javascript" src="../Content/Scripts/jquery.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.core.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.position.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.menu.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.selectmenu.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.tabs.js"></script>
So that's the sum of my script and stylesheet imports, but when it attempts to "convert" one of the <select>
elements to the JQuery UI Selectmenu, I get this error in Mozilla Web Developer in the jquery.ui.selectmenu.js, and the jquery esque theme is not applied.
I've seen similar errors before caused by the scripts being important in the wrong order and the method not existing, but can't seem to think what may be causing it here.
Any ideas would be fantastic, more code can be given if needed, but its just a <select>
element with $('#exampleSelect').selectmenu();
applied to it.
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis./ajax/libs/jqueryui/1.8.9/themes/ui-lightness/jquery-ui.css" />
<script type="text/javascript" src="../Content/Scripts/jquery.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.core.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.position.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.menu.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.selectmenu.js"></script>
<script type="text/javascript" src="../Content/Scripts/jquery.ui.tabs.js"></script>
So that's the sum of my script and stylesheet imports, but when it attempts to "convert" one of the <select>
elements to the JQuery UI Selectmenu, I get this error in Mozilla Web Developer in the jquery.ui.selectmenu.js, and the jquery esque theme is not applied.
I've seen similar errors before caused by the scripts being important in the wrong order and the method not existing, but can't seem to think what may be causing it here.
Any ideas would be fantastic, more code can be given if needed, but its just a <select>
element with $('#exampleSelect').selectmenu();
applied to it.
- hi @Christian, i have same problem, any solution? – Castro Roy Commented Jul 12, 2012 at 21:50
- It is funny, i used Firefox to copy the source code of an example in this url, view.jqueryui./selectmenu/demos/selectmenu/default.html, i even copied the .js, saved all in my puter, now, i don't get this error anymore, but, still not working as it should – Castro Roy Commented Jul 13, 2012 at 15:04
- No solution as yet :(. I'll try a similar thing. – Christian Commented Jul 19, 2012 at 8:25
- Please, let me know if you get any workarround to this issue. – Castro Roy Commented Jul 22, 2012 at 14:24
2 Answers
Reset to default 5Just a random shot in the dark. According to jQuery UI 1.9 upgrade guide, the method .uniqueId()
was only introduced in jQuery UI 1.9. Your version probably doesn't support said method, or you might be mixing different versions.
Change line 33 in jquery.ui.selectmenu.js from:
var selectmenuId = this.element.uniqueId().attr( "id" );
to:
var selectmenuId = this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 );
This will hopefully work.