summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/main.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/main.js b/js/main.js
index f4772ea..d400b79 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,14 +1,14 @@
$(function(){
if (typeof main_category == "undefined") {
- $(".sidebar dl:first").slideDown(2)
+ $(".sidebar dl:first").slideDown("slow").parent().addClass("expanded")
} else {
- $(".sidebar dl#" + main_category).slideDown(2)
+ $(".sidebar dl#" + main_category).slideDown("slow").parent().addClass("expanded")
}
$(".sidebar h3").click(function(){
- if ($(".sidebar dl#" + this.id).is(":hidden")) {
- $(".sidebar dl:visible").slideUp("fast")
- $(".sidebar dl#" + this.id).show("fast")
+ if ($(this).siblings("dl").is(":hidden")) {
+ $(".sidebar dl:visible").slideUp("fast").parent().removeClass("expanded")
+ $(this).siblings("dl").slideDown("fast").parent().addClass("expanded")
}
})
}) \ No newline at end of file