topical media & game development
lib-jquery-learning-code-11-shortcuts-jquery.slidefade.js / js
// Step 1
// jQuery.fn.slideFadeOut = function() {
// return this.animate({
// height: 'hide',
// opacity: 'hide'
// });
// };
//
// jQuery.fn.slideFadeIn = function() {
// return this.animate({
// height: 'show',
// opacity: 'show'
// });
// };
//
// jQuery.fn.slideFadeToggle = function() {
// return this.animate({
// height: 'toggle',
// opacity: 'toggle'
// });
// };
// Step 2
jQuery.fn.slideFadeOut = function(speed, callback) {
return this.animate({
height: 'hide',
opacity: 'hide'
}, speed, callback);
};
jQuery.fn.slideFadeIn = function(speed, callback) {
return this.animate({
height: 'show',
opacity: 'show'
}, speed, callback);
};
jQuery.fn.slideFadeToggle = function(speed, callback) {
return this.animate({
height: 'toggle',
opacity: 'toggle'
}, speed, callback);
};
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.