Skip to content

Commit

Permalink
Attempting to fix #122
Browse files Browse the repository at this point in the history
  • Loading branch information
thednp committed Mar 21, 2017
1 parent b66ce54 commit 6c9aa16
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
17 changes: 12 additions & 5 deletions dist/bootstrap-native-v4.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Native Javascript for Bootstrap 4 v2.0.6 | © dnp_theme | MIT-License
// Native Javascript for Bootstrap 4 v2.0.8 | © dnp_theme | MIT-License
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD support:
Expand Down Expand Up @@ -737,9 +737,16 @@
removeClass(element,collapsed);

if ( accordion !== null ) {
var activeCollapses = getElementsByClassName(accordion,component+' '+showClass);
var activeCollapses = getElementsByClassName(accordion,component+' '+showClass),
allToggles = accordion.querySelectorAll('['+dataToggle+'="'+component+'"]'),
correspondingCollapse;
for (var i=0, al=activeCollapses[length]; i<al; i++) {
if ( activeCollapses[i] !== collapse) closeAction(activeCollapses[i]);
if ( activeCollapses[i] !== collapse ) { closeAction(activeCollapses[i]); }
}
for (var u=0, atl=allToggles[length]; u<atl; u++) {
correspondingCollapse = allToggles[u][getAttribute][dataTarget] || allToggles[u].href;
if ( correspondingCollapse.split('#')[1] !== collapse.id ) { addClass(allToggles[u],collapsed); }
else { removeClass(allToggles[u],collapsed); }
}
}
};
Expand Down Expand Up @@ -1500,8 +1507,8 @@
element = queryElement(element);

// DATA API
var animationData = element[getAttribute](dataAnimation);
placementData = element[getAttribute](dataPlacement);
var animationData = element[getAttribute](dataAnimation),
placementData = element[getAttribute](dataPlacement),
delayData = element[getAttribute](dataDelay),
containerData = element[getAttribute](dataContainer),

Expand Down
4 changes: 2 additions & 2 deletions dist/bootstrap-native-v4.min.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions dist/bootstrap-native.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Native Javascript for Bootstrap 3 v2.0.7 | © dnp_theme | MIT-License
// Native Javascript for Bootstrap 3 v2.0.8 | © dnp_theme | MIT-License
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD support:
Expand Down Expand Up @@ -823,7 +823,7 @@


// event targets and constants
var accordion = null, collapse = null, self = this,
var accordion = null, collapse = null, self = this,
isAnimating = false, // when true it will prevent click handlers
accordionData = element[getAttribute]('data-parent'),

Expand Down Expand Up @@ -894,9 +894,16 @@
removeClass(element,collapsed);

if ( accordion !== null ) {
var activeCollapses = getElementsByClassName(accordion,component+' '+inClass);
var activeCollapses = getElementsByClassName(accordion,component+' '+inClass),
allToggles = accordion[querySelectorAll]('['+dataToggle+'="'+component+'"]'),
correspondingCollapse;
for (var i=0, al=activeCollapses[length]; i<al; i++) {
if ( activeCollapses[i] !== collapse) closeAction(activeCollapses[i]);
if ( activeCollapses[i] !== collapse ) { closeAction(activeCollapses[i]); }
}
for (var u=0, atl=allToggles[length]; u<atl; u++) {
correspondingCollapse = allToggles[u][getAttribute][dataTarget] || allToggles[u].href;
if ( correspondingCollapse.split('#')[1] !== collapse.id ) { addClass(allToggles[u],collapsed); }
else { removeClass(allToggles[u],collapsed); }
}
}
};
Expand Down
Loading

0 comments on commit 6c9aa16

Please sign in to comment.