fantazer
7/10/2016 - 2:01 PM

ACCORDION

ACCORDION

.accordion
	ul,li
		list-style none
		padding 0
	.inner 
		padding-left 1em
		overflow hidden
		display none
$('.toggle').click(function(e) {
	e.preventDefault();
  var $this = $(this);

  if ($this.next().hasClass('show')) {
      $this.next().removeClass('show');
      $this.next().slideUp(350);
  } else {
      $this.parent().parent().find('li .inner').removeClass('show');
      $this.parent().parent().find('li .inner').slideUp(350);
      $this.next().toggleClass('show');
      $this.next().slideToggle(350);
  }
});
ul.accordion
	li
		a.toggle(href="javascript:void(0);") ITEM 1
		ul.inner
			li One
			li Two
			li Three
	li
		a.toggle(href="javascript:void(0);") ITEM 2
		ul.inner
			li One
			li Two
			li Three
	li
		a.toggle(href="javascript:void(0);") ITEM 3
		ul.inner
			li One
			li Two
			li Three