2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add topbar dropdown js

This commit is contained in:
Jacob Thornton
2011-08-27 21:46:50 -07:00
parent e91353f362
commit ed96f181c8
5 changed files with 132 additions and 128 deletions
+22
View File
@@ -0,0 +1,22 @@
(function( $ ){
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
function clearMenus() {
$('a.menu').parent('li').removeClass('open')
}
$(window).bind("click", clearMenus)
$.fn.dropdown = function ( options ) {
return this.each(function () {
$(this).delegate('a.menu', 'click', function (e) {
clearMenus()
$(this).parent('li').toggleClass('open')
return false
})
})
}
})( jQuery || ender )