diff options
| author | tekkub <tekkub@gmail.com> | 2009-07-27 18:23:09 -0600 |
|---|---|---|
| committer | tekkub <tekkub@gmail.com> | 2009-07-27 18:23:09 -0600 |
| commit | 51cc28258c064001f758b10902a460bbd21e8aa5 (patch) | |
| tree | df251c8241ed2f39d2cef9584ab98e034da894a1 /js | |
| parent | 55ef3c86e284e589db9a633273aae29af05fcfae (diff) | |
Add expand/collapse icons, tweak sidebar style
Diffstat (limited to 'js')
| -rw-r--r-- | js/main.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |
