r3395 committed - menu, paging: next page, select first when none active; prev page, las...
Revision: 3395
Author: joern.zaefferer
Date: Mon Oct 26 14:35:43 2009
Log: menu, paging: next page, select first when none active; prev page,
last when none active
http://code.google.com/p/jquery-ui/source/detail?r=3395
Modified:
/branches/dev/ui/jquery.ui.menu.js
=======================================
--- /branches/dev/ui/jquery.ui.menu.js Sun Oct 25 05:08:59 2009
+++ /branches/dev/ui/jquery.ui.menu.js Mon Oct 26 14:35:43 2009
@@ -93,8 +93,7 @@
console.log("not last");
}
} else {
- // TODO when no active, select first
- this.activate(this.element.children(this.last() ? ":first" : ":last"));
+ this.activate(this.element.children(!this.active ||
this.last() ? ":first" : ":last"));
}
},
@@ -107,8 +106,7 @@
console.log("not first");
}
} else {
- // TODO when no active, select last
- this.activate(this.element.children(this.first() ? ":last" : ":first"));
+ this.activate(this.element.children(!this.active ||
this.first() ? ":last" : ":first"));
}
},