Skip to content
Permalink
Browse files

Menu: Improve first and last methods to take non-menuitem items into …

…account
  • Loading branch information...
jzaefferer committed Jun 19, 2010
1 parent d5df3a5 commit bf977a677059b48a6d34974645388aa3876e1655
Showing with 2 additions and 2 deletions.
  1. +2 −2 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) {

0 comments on commit bf977a6

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