, :
(function($) {
$.fn.ajaxTransitionOut = function() {
return this.find('.animate').each(function() {
$(this).animate({
left: 500,
opacity: 0
}, 4000);
});
};
})(jQuery);
$.when($('#content').ajaxTransitionOut()).done(function() {
$('html').css('backgroundColor','#999');
});
Fiddle - http://jsfiddle.net/hrm6w/8/
, , .
, , , , jQuery, ( .done() ).
, , type 'fx' (. .promise()).
Edit:
.when() .promise() :
$('#content').ajaxTransitionOut().promise().done(function() {
$('html').css('backgroundColor','#999');
});
.