]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
clean up js api for dropdowns
authorJacob Thornton <jacobthornton@gmail.com>
Sat, 28 Jan 2012 19:03:39 +0000 (11:03 -0800)
committerJacob Thornton <jacobthornton@gmail.com>
Sat, 28 Jan 2012 19:03:39 +0000 (11:03 -0800)
docs/assets/css/bootstrap.css
js/bootstrap-dropdown.js

index 7a556804174017497d76de4610210bbd601dab4e..cd0d620bf4216dff0c46ceafcd6bcf7f06da81a4 100644 (file)
@@ -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 {
index 38b6e054fcd728c789961a4952cbaca436650659..48d3ce0f85b8df688dc4128f6408cf5237ecf258 100644 (file)
 
   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