Skip to content
Permalink
Browse files

Selectmenu: remove link element and adjust styles in custom renderer …

…demo
  • Loading branch information...
fnagel committed Nov 25, 2013
1 parent 5bc7fc2 commit 32b0936e409426b861bf5e84bab40007395ded03
Showing with 6 additions and 14 deletions.
  1. +6 −14 demos/selectmenu/custom_render.html
@@ -16,20 +16,15 @@
$(function() {
$.widget( "custom.iconselectmenu", $.ui.selectmenu, {
_renderItem: function( ul, item ) {
var a, span,
li = $( "<li>" );
var li = $( "<li>", { text: item.label } );
if ( item.disabled ) {
li.addClass( "ui-state-disabled" ).text( item.label );
} else {
a = $( "<a>", {
text: item.label,
href: "#"
}).appendTo( li );
span = $( "<span>", {
$( "<span>", {
style: item.element.attr( "style" ),
"class": "ui-icon " + item.element.attr( "class" )
}).appendTo( a );
}).appendTo( li );
}
return li.appendTo( ul );
@@ -66,21 +61,18 @@
width: 200px;
}
.ui-selectmenu-menu .ui-menu .ui-icon {
top: 0.4em;
}
.ui-selectmenu-menu .ui-menu .ui-menu-item a {
padding-left: 2em;
}
/* select with custom icons */
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item a {
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item {
padding: 0.5em 0 0.5em 3em;
}
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item a .ui-icon {
.ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon {
height: 24px;
width: 24px;
top: 0.2em;
top: 0.1em;
}
.ui-icon.video {
background: url(images/24-video-square.png) 0 0 no-repeat;

0 comments on commit 32b0936

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