Skip to content

Commit

Permalink
Menu: Improve first and last methods to take non-menuitem items into …
Browse files Browse the repository at this point in the history
…account
  • Loading branch information
jzaefferer committed Jun 19, 2010
1 parent d5df3a5 commit bf977a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.menu.js
Expand Up @@ -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) {
Expand Down

0 comments on commit bf977a6

Please sign in to comment.