[ create a new paste ] login | about

Link: http://codepad.org/QzObXcff    [ raw code | fork ]

Plain Text, pasted on Dec 5:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// JavaScript Document

var j$ = jQuery;

j$(function(){
  j$(".acc").each(function(){
    j$("li > a", this).each(function(index){
      var $this = j$(this); 

      if(index > 0) $this.next().hide();

      $this.click(function(){
        j$(this).next().toggle().parent().siblings()
          .children("ul:visible").hide();
        return false;
      });
    });
  });
});


Create a new paste based on this one


Comments: