diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 6cb2c3014..46289677b 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -253,7 +253,13 @@ $.widget( "ui.selectmenu", { $.each( items, function( index, item ) { if ( item.optgroup != currentOptgroup ) { - var optgroup = $( '
  • ' + item.optgroup + '
  • ' ); + var optgroup = $( '
  • ', { + 'class': 'ui-selectmenu-optgroup', + html: item.optgroup, + click: function( event ){ + event.stopPropagation(); + } + }); if ( item.element.parent( "optgroup" ).attr( "disabled" ) ) optgroup.addClass( 'ui-state-disabled' ); ul.append( optgroup ); currentOptgroup = item.optgroup;