Skip to content

Commit 6b19249

Browse files
committed
added transferClasses option
1 parent e2bf388 commit 6b19249

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ $.widget("ui.selectmenu", {
2929
icons: null,
3030
format: null,
3131
escapeHtml: false,
32+
transferClasses: true,
3233
bgImage: function() {}
3334
},
3435

@@ -405,6 +406,12 @@ $.widget("ui.selectmenu", {
405406
.toggleClass( 'ui-icon-triangle-1-s', isDropDown )
406407
.toggleClass( 'ui-icon-triangle-2-n-s', !isDropDown );
407408

409+
// transfer classes to selectmenu and list
410+
if ( o.transferClasses ) {
411+
var transferClasses = this.element.attr( 'class' ) || '';
412+
this.newelement.add( this.list ).addClass( transferClasses );
413+
}
414+
408415
// set menu width to either menuWidth option value, width option value, or select width
409416
if ( o.style == 'dropdown' ) {
410417
this.list.width( o.menuWidth ? o.menuWidth : o.width );

0 commit comments

Comments
 (0)