Commit 5a33c1b9 authored by Jacob Thornton's avatar Jacob Thornton

make dropdowns toggle when clicked (for mobile)

parent 561fc8cf
......@@ -38,12 +38,14 @@
var $this = $(this)
, selector = $this.attr('data-target') || $this.attr('href')
, $parent = $(selector)
, isActive
$parent.length || ($parent = $this.parent())
isActive = $parent.hasClass('open')
clearMenus()
!$parent.hasClass('open') && $parent.toggleClass('open')
!isActive && $parent.toggleClass('open')
return false
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment