Fixed #5480 - Panel should close after, and not during, page animation

[The issue.](https://github.com/jquery/jquery-mobile/issues/5480)

And here's the fix.