mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
+ 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:
parent
b38b652125
commit
0cf14120d4
@ -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;
|
||||
},
|
||||
|
||||
// ----------
|
||||
|
Loading…
Reference in New Issue
Block a user