From 39532f0a8e70e21e33aab03f08136f662d03a4a1 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 31 May 2012 18:54:57 +0200 Subject: Selectmenu: Use new uniqueId method for generating id's --- ui/jquery.ui.selectmenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 2b9fea65a..c90c25725 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -35,9 +35,9 @@ $.widget( "ui.selectmenu", { }, _create: function() { - // get / make unique id - var selectmenuId = this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 ); - + // make / set unique id + var selectmenuId = this.element.uniqueId().attr( 'id' ); + // array of button and menu id's this.ids = { id: selectmenuId, button: selectmenuId + '-button', menu: selectmenuId + '-menu' }; -- cgit v1.2.3