We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 827a8cb commit bef7f1bCopy full SHA for bef7f1b
ui/jquery.ui.selectmenu.js
@@ -253,7 +253,13 @@ $.widget( "ui.selectmenu", {
253
254
$.each( items, function( index, item ) {
255
if ( item.optgroup != currentOptgroup ) {
256
- var optgroup = $( '<li class="ui-selectmenu-optgroup">' + item.optgroup + '</li>' );
+ var optgroup = $( '<li />', {
257
+ 'class': 'ui-selectmenu-optgroup',
258
+ html: item.optgroup,
259
+ click: function( event ){
260
+ event.stopPropagation();
261
+ }
262
+ });
263
if ( item.element.parent( "optgroup" ).attr( "disabled" ) ) optgroup.addClass( 'ui-state-disabled' );
264
ul.append( optgroup );
265
currentOptgroup = item.optgroup;
0 commit comments