私は、開いたり、最小化したり、閉じたりするデスクトップ スタイルのアプリケーション ウィンドウを模倣するアプリケーションに取り組んでいます。それらを展開したり折りたたんだりすることはできましたが、閉じることができず、その理由がわかりません。ボタンをクリックして現在の div を閉じることができるようにする必要があります。コード/例を参照してください。下。
<script>
$(document).ready(function () {
$("form.common").first().show();
$(".expand").click(function () {
$(this).parents().next("form.common").show();
})
$(".collapse").click(function () {
$(this).parents().next("form.common").hide();
});
$(".close").click(function () {
$(this).parents().next("div.module").hide();
});
});
</srcipt>
<div id="task_manager" class="module"> <!-- Need the x with class close to hide this div-->
<h3>Task Manager</h3> <!-- This header and below icons are shown when minimized-->
<div class="module_actions">
<span class="icons_small right close">X</span>
<span class="icons_small right collapse">-</span>
<span class="icons_small right expand">+</span>
</div>
<form class="common">
<fieldset>
<legend> Some Titlee/legend>
</fieldset>
</form>
</div>
なぜこれがdivを隠していないのか、誰にもわかりますか? ありがとう、