У меня есть функция simpel toggle (), чтобы показывать и скрывать div при нажатии кнопки. Теперь при нажатии кнопки анимация скользит вверх. Мне было интересно, можно ли заставить его скользить вниз при нажатии кнопки. См. эту скрипку или код ниже:
<html>
<head>
<script>
$( ".submit" ).click(function() {
$( ".show_to_hide, .hide_to_show" ).toggle( "slow" );
});
</script>
<style>
.hide_to_show{display:none;}
</style>
</head>
<body>
<div class="wrapper">
<div class="show_to_hide">
This is hidden on click
</div>
<div class="hide_to_show">
This is shown on click
</div>
<button class="submit">
Submit
</button>
</div>
</body>
</html>