We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa692bb commit 7932007Copy full SHA for 7932007
ui/jquery.ui.selectmenu.js
@@ -28,13 +28,13 @@ $.widget("ui.selectmenu", {
28
29
_create: function() {
30
var self = this, o = this.options;
31
-
32
- // set a default id value, generate a new random one if not set by developer
33
- var selectmenuId = ( this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 ) ).replace( /(:|\.)/g, '' )
+
+ // make / set unique id
+ var selectmenuId = this.element.uniqueId().attr( "id" );
34
35
// quick array of button and menu id's
36
this.ids = [ selectmenuId, selectmenuId + '-button', selectmenuId + '-menu' ];
37
38
// define safe mouseup for future toggling
39
this._safemouseup = true;
40
this.isOpen = false;
0 commit comments