I have the following snippet that toggles padding when hovering (see example here):
<div id="outer"><div id="inner"></div></div>
<script>
$("#inner").mouseenter(function () {
$("#outer").animate({ 'padding' : '20px' }, "slow");
});
$("#inner").mouseleave(function () {
$("#outer").animate({ 'padding' : '0px' }, "slow");
});
</script>
The goal is to have the padding animate both in and out, however currently no animation appears for animating out. I did some tests, and if I change the leave padding to 10 pixels (from 0 pixels) it runs an animation, but starts at zero and animates outwards. I'm running jQuery 1.4.3. Any way to fix this?