You can wrap this div in another div that maintains the correct width / height to maintain a consistent layout.
<div style="width:300px;height:200px">
<div class="animateMe">
<p>When I close, the outer div will still be there.</p>
</div>
</div>
/ , javascript . .width() .height() div css div.