I'd like to use .animate and slideToggle at the same time because if I do it like this, it doesn't run at the same time:
$(element).slideToggle(5000);
$(element).animate({
paddingTop: '50px'
}, 5000);
I've already tried this. But the animation doesn't run smooth and kid of "jumps" (not smooth for .def)
$(element).slideToggle(5000);
$(element).animate({
paddingTop: '50px',
height: 'toggle'
}, 5000);
<div class="element"> /* is display: none at start */
<p>abc</p>
<a class="def">
<img src="img.png">
Close
</a>
</div>