diff options
| author | Ivan Cheung <[email protected]> | 2015-02-04 16:25:57 -0600 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-02-26 18:48:20 -0800 |
| commit | d5071b19f181c1cb4f71ae77ca5effbccca6c66e (patch) | |
| tree | 29b906110c140a8274965c6082526c9d7aeb1f89 /js/collapse.js | |
| parent | 984204c39e00d267f49c39d100d0ac2aab8dae9c (diff) | |
| download | bootstrap-d5071b19f181c1cb4f71ae77ca5effbccca6c66e.tar.xz bootstrap-d5071b19f181c1cb4f71ae77ca5effbccca6c66e.zip | |
Update all collapse triggers with .collapsed class and aria-expanded
Fixes #15741
Closes #15751 by merging it.
Diffstat (limited to 'js/collapse.js')
| -rw-r--r-- | js/collapse.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/collapse.js b/js/collapse.js index 2bc30e7ba..834f4f6b8 100644 --- a/js/collapse.js +++ b/js/collapse.js @@ -16,7 +16,8 @@ var Collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]') + this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning = null if (this.options.parent) { @@ -33,8 +34,7 @@ Collapse.TRANSITION_DURATION = 350 Collapse.DEFAULTS = { - toggle: true, - trigger: '[data-toggle="collapse"]' + toggle: true } Collapse.prototype.dimension = function () { @@ -203,7 +203,7 @@ var $target = getTargetFromTrigger($this) var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this }) + var option = data ? 'toggle' : $this.data() Plugin.call($target, option) }) |
