Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: static/js/main.js

Issue 29572657: Issue 5787 - Add Topics Accordion to Article Template on help.eyeo.com (Closed) Base URL: https://hg.adblockplus.org/help.eyeo.com
Patch Set: Addressed final NITs Created Oct. 11, 2017, 5:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « includes/product-topics-accordion.tmpl ('k') | templates/article.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static/js/main.js
===================================================================
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -188,16 +188,16 @@
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++)
+ var productTopicsAccordion = document.getElementById('product-topics-accordion');
+ if (productTopicsAccordion)
{
- new Accordion(accordions[i]);
+ new Accordion(productTopicsAccordion);
}
}, false);
}());
« no previous file with comments | « includes/product-topics-accordion.tmpl ('k') | templates/article.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld