Skip to content
Permalink
Browse files

Selectmenu: changed this.ids to associative array

  • Loading branch information...
fnagel committed Oct 12, 2011
1 parent 7b9813c commit 0c954cb243a12e3607f88f65084847692fdb3a4f
Showing with 6 additions and 6 deletions.
  1. +6 −6 ui/jquery.ui.selectmenu.js
@@ -41,7 +41,7 @@ $.widget( "ui.selectmenu", {
var selectmenuId = this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 );

// quick array of button and menu id's
this.ids = [ selectmenuId, selectmenuId + '-button', selectmenuId + '-menu' ];
this.ids = { id: selectmenuId, button: selectmenuId + '-button', menu: selectmenuId + '-menu' };

// set current value
if ( this.options.value ) {
@@ -73,14 +73,14 @@ $.widget( "ui.selectmenu", {

// create button
this.button = $( '<a />', {
href: '#' + this.ids[ 0 ],
href: '#' + this.ids.id,
tabindex: ( tabindex ? tabindex : this.element.attr( 'disabled' ) ? -1 : 0 ),
id: this.ids[ 1 ],
id: this.ids.button,
css: {
width: this.element.outerWidth()
},
'aria-disabled': this.options.disabled,
'aria-owns': this.ids[ 2 ],
'aria-owns': this.ids.menu,
'aria-haspopup': true
})
.button({
@@ -104,9 +104,9 @@ $.widget( "ui.selectmenu", {
this.menu = $( '<ul />', {
'class': 'ui-widget ui-widget-content',
'aria-hidden': true,
'aria-labelledby': this.ids[1],
'aria-labelledby': this.ids.button,
role: 'menubox',
id: this.ids[2]
id: this.ids.menu
});

// set width

0 comments on commit 0c954cb

Please sign in to comment.
You can’t perform that action at this time.