I have this piece of code:

```
$(this).css('color', 'red');
if(confirm('Do you want to delete this item?'))
    window.location.href = link;
else
    $(this).css('color', 'black');

```

But unfortunately the css('color', red) doesn't execute before the confirm() is called. If i use animate instead of css, and perform the confirm() in the callback function it get's executed **before** the animation is actually complete.

Note this issue doesn't appear in chrome, there it works fine (for me).