diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-26 20:13:50 -0400 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-26 20:13:50 -0400 |
commit | 885fea1f3d458ee884be0b20af03f2fbe362cc8b (patch) | |
tree | 012c6c2034660e9c21187dc930c81d575ae1c402 /tests/visual | |
parent | e49af16c5a4b00a99e0be940022c2313eaf7c7b3 (diff) | |
download | jquery-ui-885fea1f3d458ee884be0b20af03f2fbe362cc8b.tar.gz jquery-ui-885fea1f3d458ee884be0b20af03f2fbe362cc8b.zip |
Drilldown menu: First attempt at drilldown animations
Diffstat (limited to 'tests/visual')
-rw-r--r-- | tests/visual/menu/drilldown.html | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/visual/menu/drilldown.html b/tests/visual/menu/drilldown.html index 0c18c3679..1539045f0 100644 --- a/tests/visual/menu/drilldown.html +++ b/tests/visual/menu/drilldown.html @@ -51,11 +51,23 @@ _open: function(submenu) { this.active = submenu.show().css({ top: 0, - left: 0 + left: 0, + opacity: 0 }).position({ my: "left top", - at: "left top", + at: "right top", of: this.widget() + }).position({ + my: "left top", + at: "left top", + of: this.widget(), + using: function(to) { + $(this).animate({ + left: to.left, + top: to.top, + opacity: 1 + }); + } }); this.back.show(); }, @@ -64,8 +76,20 @@ if (this.active.parent()[0] == this.element[0]) { return; } - this.active.hide(); + this.active.position({ + my: "left top", + at: "right top", + of: this.widget(), + using: function(to) { + $(this).animate({ + left: to.left, + top: to.top, + opacity: 0 + }); + } + }); this.active = this.active.parent().parent().show(); + this.activeItem = this.active.data("menu").active; if (!this.active.parent().parent().is(":ui-menu")) { this.back.hide(); } |