summaryrefslogtreecommitdiff
path: root/js/main.js
blob: 77591707349d171104dff357f03ddab0adeda28e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$(function(){
  if (typeof main_category == "undefined") {
    $(".sidebar dl:first").slideDown("slow").parent().addClass("expanded")
  } else {
    $(".sidebar dl#" + main_category).slideDown("slow").parent().addClass("expanded")
  }

  $(".sidebar li").click(function(){
    if ($(this).children("dl").is(":hidden")) {
      $(".sidebar dl:visible").slideUp("fast").parent().removeClass("expanded")
      $(this).addClass("expanded").children("dl").slideDown("fast")
    }
  })
})