From: Jacob Thornton Date: Sat, 25 May 2013 06:15:04 +0000 (-0700) Subject: add show/shown hide/hidden events to dropdown + update dropdown links for testing... X-Git-Tag: v3.0.0-rc1~312^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3e45c37780b12a3fa96e7d4578f38a883cba9a0;p=thirdparty%2Fbootstrap.git add show/shown hide/hidden events to dropdown + update dropdown links for testing + catch a few missed namespace things --- diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index f19a123a4a..b2b4086726 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -433,7 +433,7 @@ // CAROUSEL DATA-API // ================= - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { var $this = $(this), href var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var options = $.extend({}, $target.data(), $this.data()) @@ -590,7 +590,7 @@ // COLLAPSE DATA-API // ================= - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { var $this = $(this), href var target = $this.attr('data-target') || e.preventDefault() @@ -630,10 +630,7 @@ var backdrop = '.dropdown-backdrop' var toggle = '[data-toggle=dropdown]' var Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) + var $el = $(element).on('click.bs.dropdown', this.toggle) } Dropdown.prototype.toggle = function (e) { @@ -651,7 +648,14 @@ // if mobile we we use a backdrop because click events don't delegate $('