From: Felix Nagel Date: Thu, 17 May 2012 16:49:01 +0000 (+0200) Subject: fixed: bug when using selectors like #one:two, improved replace for specific selector... X-Git-Tag: selectmenu_v1.2.2~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0f8f863516166700beb54b9334b1d161d3123bee;p=jquery-ui.git fixed: bug when using selectors like #one:two, improved replace for specific selector chars, see #230, thx to @sirsimo --- diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index e92e0a50c..59a707e7c 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -36,7 +36,7 @@ $.widget("ui.selectmenu", { var self = this, o = this.options; // set a default id value, generate a new random one if not set by developer - var selectmenuId = (this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 )).replace(':', '\\:'); + var selectmenuId = (this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 )).replace(/(:|\.)/g,'') // quick array of button and menu id's this.ids = [ selectmenuId, selectmenuId + '-button', selectmenuId + '-menu' ];