注文フォームを表示/非表示にしたいアニメーションは、1 つの問題を除いて完全に機能します。フォームが下にスライドしても非表示にならず、その一部がまだ表示されています。
HTML:
<div class="post">
<div class="post-content">
<a href="" class="order"></a>
...
</div>
<div class="order-form">
<a href="" class="close"></a>
...
</div>
</div>
jQuery:
$(".post .order").click(function () {
$(this).fadeOut();
$(this).parents('.post-content').slideUp();
$(this).parents('.post-content').next('.order-form').show();
$(this).parents().find('.close').fadeIn();
return false;
});
$(".order-form .close").click(function () {
$(this).fadeOut();
$(this).parents('.order-form').slideDown();
$(this).parents('.order-form').prev('.post-content').slideDown(function(){
$(this).parents('.order-form').prev('.post-content').css('display', 'none');
});
$(this).parents().find('.order').fadeIn();
return false;
});
..ご覧のとおり、試してみ.hide()
ましたが、期待どおりに機能しません。きちんとした引き出し(正しい言葉ですか?)のような効果に必要なスライドダウンアニメーションが無効になりました。
ありがとう!