aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.menu.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-04-20 17:18:15 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2011-04-20 17:18:15 +0200
commit34e3a2401afc831ad084af1942670118a3ccabb1 (patch)
tree4273482e7c1ee539c49c1080e9545e43a5b24d39 /ui/jquery.ui.menu.js
parentf0d5a0008f193c1ebabd808ff0a9f88455b02658 (diff)
downloadjquery-ui-34e3a2401afc831ad084af1942670118a3ccabb1.tar.gz
jquery-ui-34e3a2401afc831ad084af1942670118a3ccabb1.zip
Menu: Add icons support
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r--ui/jquery.ui.menu.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index f233aeeb0..3b48d29a3 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -28,6 +28,9 @@ $.widget("ui.menu", {
var self = this;
this.activeMenu = this.element;
this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++;
+ if (this.element.find(".ui-icon").length) {
+ this.element.addClass("ui-menu-icons");
+ }
this.element
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
.attr({
@@ -184,7 +187,7 @@ $.widget("ui.menu", {
submenus
.prev("a")
- .prepend('<span class="ui-icon ui-icon-carat-1-e"></span>');
+ .prepend('<span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span>');
// don't refresh list items that are already adapted