Permalink
Browse files

added transferClasses option

  • Loading branch information...
1 parent e2bf388 commit 6b19249cc9a2ef3bf75be4e16dfb4aaf3373fe2e @neocoder committed Jul 11, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 ui/jquery.ui.selectmenu.js
@@ -29,6 +29,7 @@ $.widget("ui.selectmenu", {
icons: null,
format: null,
escapeHtml: false,
+ transferClasses: true,
bgImage: function() {}
},
@@ -405,6 +406,12 @@ $.widget("ui.selectmenu", {
.toggleClass( 'ui-icon-triangle-1-s', isDropDown )
.toggleClass( 'ui-icon-triangle-2-n-s', !isDropDown );
+ // transfer classes to selectmenu and list
+ if ( o.transferClasses ) {
+ var transferClasses = this.element.attr( 'class' ) || '';
+ this.newelement.add( this.list ).addClass( transferClasses );
+ }
+
// set menu width to either menuWidth option value, width option value, or select width
if ( o.style == 'dropdown' ) {
this.list.width( o.menuWidth ? o.menuWidth : o.width );

0 comments on commit 6b19249

Please sign in to comment.