aboutsummaryrefslogtreecommitdiffstats
path: root/demos/selectmenu
diff options
context:
space:
mode:
Diffstat (limited to 'demos/selectmenu')
-rw-r--r--demos/selectmenu/custom_render.html9
1 files changed, 5 insertions, 4 deletions
diff --git a/demos/selectmenu/custom_render.html b/demos/selectmenu/custom_render.html
index 76493dc98..9329b81b1 100644
--- a/demos/selectmenu/custom_render.html
+++ b/demos/selectmenu/custom_render.html
@@ -16,7 +16,8 @@
$(function() {
$.widget( "custom.iconselectmenu", $.ui.selectmenu, {
_renderItem: function( ul, item ) {
- var li = $( "<li>", { text: item.label } );
+ var li = $( "<li>" ),
+ wrapper = $( "<div>", { text: item.label } );
if ( item.disabled ) {
li.addClass( "ui-state-disabled" );
@@ -26,9 +27,9 @@
style: item.element.attr( "data-style" ),
"class": "ui-icon " + item.element.attr( "data-class" )
})
- .appendTo( li );
+ .appendTo( wrapper );
- return li.appendTo( ul );
+ return li.append( wrapper ).appendTo( ul );
}
});
@@ -63,7 +64,7 @@
}
/* select with custom icons */
- .ui-selectmenu-menu .ui-menu.customicons .ui-menu-item {
+ .ui-selectmenu-menu .ui-menu.customicons .ui-menu-item-wrapper {
padding: 0.5em 0 0.5em 3em;
}
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon {