Selectmenu: use text() instead of html() as the option and optgroup is read as text

This commit is contained in:
Felix Nagel 2012-12-03 23:07:30 +01:00
parent cba09dafa7
commit 60e3302d96

View File

@ -260,7 +260,7 @@ $.widget( "ui.selectmenu", {
if ( item.optgroup !== currentOptgroup ) { if ( item.optgroup !== currentOptgroup ) {
$( "<li />", { $( "<li />", {
"class": "ui-selectmenu-optgroup" + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? " ui-state-disabled" : "" ), "class": "ui-selectmenu-optgroup" + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? " ui-state-disabled" : "" ),
html: item.optgroup text: item.optgroup
}).appendTo( ul ); }).appendTo( ul );
currentOptgroup = item.optgroup; currentOptgroup = item.optgroup;
} }
@ -274,7 +274,7 @@ $.widget( "ui.selectmenu", {
li.addClass( "ui-state-disabled" ); li.addClass( "ui-state-disabled" );
} }
li.append( $( "<a />", { li.append( $( "<a />", {
html: item.label, text: item.label,
href: "#" href: "#"
}) })
); );