diff options
| author | Jacob Thornton <[email protected]> | 2012-01-28 11:03:39 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-01-28 11:03:39 -0800 |
| commit | d4659521386eab794eaf67f57e8762656aa28de7 (patch) | |
| tree | 330c5748a875c135fb8f1a5be4888cb92e33c50b | |
| parent | ab8f4a394c3ffef58e11c872f27927a9ffe4db11 (diff) | |
| download | bootstrap-d4659521386eab794eaf67f57e8762656aa28de7.tar.xz bootstrap-d4659521386eab794eaf67f57e8762656aa28de7.zip | |
clean up js api for dropdowns
| -rw-r--r-- | docs/assets/css/bootstrap.css | 2 | ||||
| -rw-r--r-- | js/bootstrap-dropdown.js | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 7a5568041..cd0d620bf 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1986,7 +1986,7 @@ table .span12 { .navbar-search .search-query :-moz-placeholder { color: #eeeeee; } -.navbar-search .search-query ::-webkit-input-placeholder { +.navbar-search .search-query::-webkit-input-placeholder { color: #eeeeee; } .navbar-search .search-query:hover { diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 38b6e054f..48d3ce0f8 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -27,7 +27,10 @@ var toggle = '[data-toggle="dropdown"]' , Dropdown = function ( element ) { - $(element).bind('click', this.toggle) + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) } Dropdown.prototype = { @@ -51,7 +54,6 @@ isActive = $parent.hasClass('open') clearMenus() - !isActive && $parent.toggleClass('open') return false |
