xxxxxxxxxx
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").slideToggle();
});
});
</script>
xxxxxxxxxx
$("#element").click(function() {
$(this).animate({
height: 'toggle',
opacity: 'toggle'
}, 'slow');
});