views:

26

answers:

1

I'm trying to display an image while I'm doing some Ajax updating (which I've placed in a queue). Here's the code

        $(".SaveButton").click(function () {
            $(".SavingImage").fadeIn("fast");
            $(this).dequeue("Updates");
            $(".SavingImage").fadeOut("fast");
            $(".ResultItem").data("isDirty", false)
        });

.show() and .hide() work, but not the animations. Let me know if more code is needed, I figured this would suffice.

+2  A: 

you need to add the function in the call back of the animate function. Something like this:

$(".SaveButton").click(function () {
   $(".SavingImage").fadeIn("fast",function(){
     $(this).dequeue("Updates");
   });
   $(".SavingImage").fadeOut("fast");
   $(".ResultItem").data("isDirty", false));
});
Alex