+ Added animation to showing/hiding the tabbar

+ More updates to the TabCandy Spec
This commit is contained in:
Aza Raskin 2010-04-20 13:53:07 -04:00
parent a4c6d936cc
commit f2998ab293

View File

@ -14,8 +14,17 @@ Navbar = {
// ##########
var Tabbar = {
get el(){ return window.Tabs[0].raw.parentNode; },
hide: function(){ this.el.collapsed = true; },
show: function(){ this.el.collapsed = false; },
height: window.Tabs[0].raw.parentNode.getBoundingClientRect().height,
hide: function(){
var self = this;
$(self.el).animate({"marginTop":-self.height}, 150, function(){
self.el.collapsed = true;
});
},
show: function(){
this.el.collapsed = false;
$(this.el).animate({"marginTop":0}, 150);
},
get isHidden(){ return this.el.collapsed; }
}