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