Skip to content
Permalink
Browse files

Selectmenu: improve element creation

  • Loading branch information...
fnagel committed Jan 2, 2013
1 parent 1ba02e9 commit c9602857ddeeb8dcbc208be91beb2dee5f08c5a0
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/jquery.ui.selectmenu.js
@@ -229,7 +229,7 @@ $.widget( "ui.selectmenu", {

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

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

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

0 comments on commit c960285

Please sign in to comment.
You can’t perform that action at this time.