Index: static/js/main.js |
=================================================================== |
--- a/static/js/main.js |
+++ b/static/js/main.js |
@@ -188,16 +188,15 @@ |
Accordion.prototype._onClick = function(event) |
{ |
if (!event.target.classList.contains("accordion-toggle-button")) return; |
this.toggleSection(event.target); |
} |
- var accordions = document.getElementsByClassName('accordion'); |
- for (var i = 0; i < accordions.length; i++) |
+ if (document.getElementById('product-topics-accordion')) |
juliandoucette
2017/10/11 15:09:48
NIT: I would query once and [check, use] the resul
ire
2017/10/11 17:01:41
I prefer your suggestion. Done.
|
{ |
- new Accordion(accordions[i]); |
+ new Accordion(document.getElementById('product-topics-accordion')); |
} |
}, false); |
}()); |