1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 02:24:19 +02:00
This commit is contained in:
Mark Otto
2017-09-12 22:24:15 -07:00
parent 5becfa6fb1
commit 75d435f76e
31 changed files with 543 additions and 2282 deletions

16
js/dist/collapse.js vendored
View File

@@ -62,14 +62,14 @@ var Collapse = function () {
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Collapse = function () {
function Collapse(element, config) {
_classCallCheck(this, Collapse);
@@ -353,7 +353,7 @@ var Collapse = function () {
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A' && !$.contains(this, event.target)) {
if (event.currentTarget.tagName === 'A') {
event.preventDefault();
}