aboutsummaryrefslogtreecommitdiffstats
path: root/demos/selectmenu
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-11-26 00:32:27 +0100
committerFelix Nagel <info@felixnagel.com>2013-11-26 00:32:27 +0100
commit32b0936e409426b861bf5e84bab40007395ded03 (patch)
tree695cbf222fe9a7ad5fa34faa7f3ef7a513fcbda4 /demos/selectmenu
parent5bc7fc2b1a248063b4d52086dfc32fae8601680e (diff)
downloadjquery-ui-32b0936e409426b861bf5e84bab40007395ded03.tar.gz
jquery-ui-32b0936e409426b861bf5e84bab40007395ded03.zip
Selectmenu: remove link element and adjust styles in custom renderer demo
Diffstat (limited to 'demos/selectmenu')
-rw-r--r--demos/selectmenu/custom_render.html20
1 files changed, 6 insertions, 14 deletions
diff --git a/demos/selectmenu/custom_render.html b/demos/selectmenu/custom_render.html
index b037d325a..fb8127bbd 100644
--- a/demos/selectmenu/custom_render.html
+++ b/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;