diff options
Diffstat (limited to 'docs/assets/js/bootstrap-dropdown.js')
-rw-r--r-- | docs/assets/js/bootstrap-dropdown.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/assets/js/bootstrap-dropdown.js b/docs/assets/js/bootstrap-dropdown.js new file mode 100644 index 0000000000..9fbeb44b09 --- /dev/null +++ b/docs/assets/js/bootstrap-dropdown.js @@ -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 )
\ No newline at end of file |