+ Started on iQ for tabitems.js; now using iQ for TabItem.setBounds. We're not yet supporting the tabcandy bounce animation, so the tab movement boring now… to be fixed soon.

+ Added fadeIn and fadeOut to iQ
+ Added a simple test framework to stand in for mochitest, and gave it a couple of iQ tests
This commit is contained in:
Ian Gilman 2010-06-03 17:11:13 -07:00
parent b38b652125
commit 0cf14120d4

View File

@ -576,6 +576,7 @@ iQ.fn = iQ.prototype = {
// ----------
// Function: animate
animate: function(css, duration, callback) {
Utils.assert('does not yet support multi-objects (or null objects)', this.length == 1);
try {
this.addClass(duration);
iQ.animationCount++;
@ -588,7 +589,7 @@ iQ.fn = iQ.prototype = {
self.removeClass(duration);
cleanedUp = true;
if(iQ.isFunction(callback))
callback();
callback.apply(this);
}
});
@ -597,6 +598,34 @@ iQ.fn = iQ.prototype = {
Utils.log('iQ.fn.animate error', e);
}
return this;
},
// ----------
// Function: fadeOut
fadeOut: function() {
try {
this.animate({opacity: 0}, 'animate350', function() {
iQ(this).css({display: 'none'});
});
} catch(e) {
Utils.log(e);
}
return this;
},
// ----------
// Function: fadeIn
fadeIn: function() {
try {
this.css({display: ''});
this.animate({opacity: 1}, 'animate350');
} catch(e) {
Utils.log(e);
}
return this;
},
// ----------