aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-06-19 17:16:15 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-06-19 17:16:15 +0200
commitbf977a677059b48a6d34974645388aa3876e1655 (patch)
treec0ff2e13bafefc6ccf0e5f333b7234f4bf5b3f47
parentd5df3a5a5649c299ae404cff564ac59d53526cd2 (diff)
downloadjquery-ui-bf977a677059b48a6d34974645388aa3876e1655.tar.gz
jquery-ui-bf977a677059b48a6d34974645388aa3876e1655.zip
Menu: Improve first and last methods to take non-menuitem items into account
-rw-r--r--ui/jquery.ui.menu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index b81915fd7..e4f6990d5 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -155,11 +155,11 @@ $.widget("ui.menu", {
},
first: function() {
- return this.active && !this.active.prev().length;
+ return this.active && !this.active.prevAll(".ui-menu-item").length;
},
last: function() {
- return this.active && !this.active.next().length;
+ return this.active && !this.active.nextAll(".ui-menu-item").length;
},
_move: function(direction, edge, event) {