Animating height with toogle gets sligthly higher and falls back

Animating height with toogle gets sligthly higher and falls back

Hi

I am trying to animate a div to the window center in a responsive way. Things work so far great except that somehow it animates a little bit higher then it should and falls back a little bit.

I use jQuery 1.7, but the same is in 1.8.

Here's the code:
  1. $(".core-dialog-box").animate({"width": "40%", "height": 'toggle', "top": '20%', 'left': '20%'}, 1500 , function() {});

Hope someone can give me a hint. Thanks in advance.