Commit 709789d1 authored by Jacob Thornton's avatar Jacob Thornton

clicking open dropdown shoud close it

parent 7e5b304d
......@@ -36,8 +36,11 @@
$.fn.dropdown = function ( options ) {
return this.each(function () {
$(this).delegate(selector, 'click', function (e) {
var li = $(this).parent('li')
, isActive = li.hasClass('open')
clearMenus()
$(this).parent('li').toggleClass('open')
!isActive && li.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