summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authortekkub <tekkub@gmail.com>2009-07-27 18:23:09 -0600
committertekkub <tekkub@gmail.com>2009-07-27 18:23:09 -0600
commit51cc28258c064001f758b10902a460bbd21e8aa5 (patch)
treedf251c8241ed2f39d2cef9584ab98e034da894a1 /js
parent55ef3c86e284e589db9a633273aae29af05fcfae (diff)
Add expand/collapse icons, tweak sidebar style
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