Browse Source

Fixed "active" class bug with toggle within a segmented control body (fixed older commit)

pull/839/head
thewax 8 years ago
parent
commit
52f18a12c0
  1. 5
      js/segmented-controllers.js

5
js/segmented-controllers.js

@ -28,13 +28,14 @@
var targetBody;
var targetTab = getTarget(e.target);
var className = 'active';
var classSelector = '.' + className;
var classSelector = '.control-content.' + className;
var tabClassSelector = '.control-item.' + className;
if (!targetTab) {
return;
}
activeTab = targetTab.parentNode.querySelector(classSelector);
activeTab = targetTab.parentNode.querySelector(tabClassSelector);
if (activeTab) {
activeTab.classList.remove(className);

Loading…
Cancel
Save