jQuery callback after slideUp

jquery

Solution

Method `slideUp()` has `callback` argument. So you can do it easily with:

$(".SomeDiv").slideUp(400, function() {
    // Animation complete.
    SomeFunction();
});

Problem

I have this code: ``` $('.SomeDiv').slideUp(400); setTimeout(function () { SomeFunction(); }, 400); ``` How do I rewrite this and remove the `setTimeout` so that `SomeFunction` becomes a call-back function of `slideUp`.

Original source