Skip to content

Commit c960285

Browse files
committed
Selectmenu: improve element creation
1 parent 1ba02e9 commit c960285

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.selectmenu.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ $.widget( "ui.selectmenu", {
229229

230230
$.each( items, function( index, item ) {
231231
if ( item.optgroup !== currentOptgroup ) {
232-
$( "<li />", {
232+
$( "<li>", {
233233
"class": "ui-selectmenu-optgroup" + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? " ui-state-disabled" : "" ),
234234
text: item.optgroup
235235
}).appendTo( ul );
@@ -240,8 +240,8 @@ $.widget( "ui.selectmenu", {
240240
},
241241

242242
_renderItem: function( ul, item ) {
243-
var li = $( "<li />" ).data( "ui-selectmenu-item", item ),
244-
a = $( "<a />", { href: "#" });
243+
var li = $( "<li>" ).data( "ui-selectmenu-item", item ),
244+
a = $( "<a>", { href: "#" });
245245

246246
if ( item.disabled ) {
247247
li.addClass( "ui-state-disabled" );

0 commit comments

Comments
 (0)