I want to know if the jQuery transfer effect has any callback mechanism by which I can determine when a transfer effect starts and when ends. I got the code below, but I found no callback function…
Please help. Thanks.
$("div").click(function () {
var i = 1 - $("div").index(this);
$(this).effect("transfer", { to: $("div").eq(i) }, 1000);
});
Assuming you’re talking about jQuery UI’s
effectmethod, then it takes acallbackfunction as an argument. That callback will run when the effect has completed:As for when the effect starts, the lines following the call to
effectshould be run immediately after the call (so before the effect is complete).