From 08b8571cb842e9fc668d9faf6c305a51523b27fb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 5 Sep 2012 10:00:57 -0700 Subject: version bump to get this started --- js/bootstrap-dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-dropdown.js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 42370dfbe..0ef9b0f9d 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.1.1 + * bootstrap-dropdown.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. -- cgit v1.2.3 From 474471b83140350de320f3ba940bd7dd8326b32e Mon Sep 17 00:00:00 2001 From: Carl Porth Date: Wed, 26 Sep 2012 23:11:03 -0700 Subject: bind data-api events to document instead of body to allow body replacement --- js/bootstrap-dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-dropdown.js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 0ef9b0f9d..5a2766fde 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -141,7 +141,7 @@ $(function () { $('html') .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) - $('body') + $(document) .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) -- cgit v1.2.3 From e9a648cd39dc6b5e0f126b7272adeac816ece758 Mon Sep 17 00:00:00 2001 From: Erlend Halvorsen Date: Thu, 27 Sep 2012 10:31:40 +0200 Subject: Fixed bug in dropdown toggle where menu would only clear on the first drop down --- js/bootstrap-dropdown.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/bootstrap-dropdown.js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 0ef9b0f9d..503fb7b3a 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -99,9 +99,10 @@ } - function clearMenus() { - getParent($(toggle)) - .removeClass('open') + function clearMenus() { + $(toggle).each(function () { + getParent($(this)).removeClass("open") + }) } function getParent($this) { -- cgit v1.2.3 From e1f6458e3640a628cdb6b2e4c63950777d46e141 Mon Sep 17 00:00:00 2001 From: Carl Porth Date: Thu, 27 Sep 2012 15:00:02 -0700 Subject: don't wait for ready when binding events to document --- js/bootstrap-dropdown.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'js/bootstrap-dropdown.js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 5a2766fde..f50aa64d6 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -138,13 +138,10 @@ /* APPLY TO STANDARD DROPDOWN ELEMENTS * =================================== */ - $(function () { - $('html') - .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) - $(document) - .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) - }) + $(document) + .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) }(window.jQuery); \ No newline at end of file -- cgit v1.2.3 From 41ad16fe406956cc8604b295ae0b5f185386c595 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 29 Oct 2012 21:00:53 -0700 Subject: v2.2.0 instead of v2.1.2 --- js/bootstrap-dropdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/bootstrap-dropdown.js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 4f99e04ff..d8821b944 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.1.2 + * bootstrap-dropdown.js v2.2.0 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -99,8 +99,8 @@ } - function clearMenus() { - $(toggle).each(function () { + function clearMenus() { + $(toggle).each(function () { getParent($(this)).removeClass("open") }) } -- cgit v1.2.3