
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.61 KB | hits: 9 | expires: Never
simple jQuery Chaining insight
$(this).parent().fadeOut(500).remove();
$(this).parent().fadeOut(500,function() { $(this).remove(); });
$.fn.fxRemove = function() {
this.queue(function(next) {
$(this).remove();
next();
});
return(this);
}
$(this).parent().fadeOut(500).fxRemove();
$.fn.q = function(fn) {
var that = this, arg = Array.prototype.slice.call(arguments, 1);
return this.queue(function(next) {
that[fn].apply(that, arg);
next();
});
};
$(this).parent().fadeOut(500).q('remove');
$(this).parent().fadeOut().delay(500).remove();