aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-10-12 22:06:18 +0200
committerFelix Nagel <info@felixnagel.com>2011-10-12 22:06:18 +0200
commit0c954cb243a12e3607f88f65084847692fdb3a4f (patch)
tree34f23bdc37c8e3f56fc0afcfbc445ff78b97c246
parent7b9813c40ec7f0abde791d97b9343b075ecd3ce8 (diff)
downloadjquery-ui-0c954cb243a12e3607f88f65084847692fdb3a4f.tar.gz
jquery-ui-0c954cb243a12e3607f88f65084847692fdb3a4f.zip
Selectmenu: changed this.ids to associative array
-rw-r--r--ui/jquery.ui.selectmenu.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index 05104de93..689f75255 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/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