mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: use text() instead of html() as the option and optgroup is read as text
This commit is contained in:
parent
cba09dafa7
commit
60e3302d96
4
ui/jquery.ui.selectmenu.js
vendored
4
ui/jquery.ui.selectmenu.js
vendored
@ -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: "#"
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user