1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

move javascript from examples into docs

This commit is contained in:
Jacob Thornton
2011-09-06 23:20:56 -07:00
parent d0882c580d
commit fb8987148a
11 changed files with 33 additions and 113 deletions

24
docs/assets/js/bootstrap-dropdown.js vendored Normal file
View File

@@ -0,0 +1,24 @@
(function( $ ){
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
function clearMenus() {
$('a.menu').parent('li').removeClass('open')
}
$(function () {
$('body').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 )