r2729 - set transferClasses to transfer to the menu element as well as the menu button, for shari...
Author: scottjehl
Date: Fri Jun 12 10:00:29 2009
New Revision: 2729
Modified:
branches/labs/selectmenu/ui.selectmenu.js
Log:
set transferClasses to transfer to the menu element as well as the menu
button, for sharing selectors.
Modified: branches/labs/selectmenu/ui.selectmenu.js
==============================================================================
--- branches/labs/selectmenu/ui.selectmenu.js (original)
+++ branches/labs/selectmenu/ui.selectmenu.js Fri Jun 12 10:00:29 2009
@@ -21,12 +21,6 @@
this.newelement = $('<a class="ui-selectmenu ui-widget ui-state-default
ui-corner-all" id="'+this.ids[0]+'" href="#" aria-haspopup="true"
aria-owns="'+this.ids[1]+'"></a>')
.insertAfter(this.element);
- //transfer classes to selectmenu
- if(o.transferClasses){
- var transferClasses = this.element.attr('class') || '';
- this.newelement.addClass(transferClasses);
- }
-
//transfer tabindex
var tabindex = this.element.attr('tabindex') || '0';
this.newelement.attr('tabindex', tabindex);
@@ -141,6 +135,12 @@
this.list.find('li:last').addClass("ui-corner-bottom");
if(o.style == 'popup'){
this.list.find('li:first').addClass("ui-corner-top");
+ }
+
+ //transfer classes to selectmenu and list
+ if(o.transferClasses){
+ var transferClasses = this.element.attr('class') || '';
+ this.newelement.add(this.list).addClass(transferClasses);
}
//original selectmenu width