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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « includes/product-topics-accordion.tmpl ('k') | templates/article.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function(){ 1 (function(){
2 document.addEventListener("DOMContentLoaded", function() 2 document.addEventListener("DOMContentLoaded", function()
3 { 3 {
4 4
5 /************************************************************************** 5 /**************************************************************************
6 * General 6 * General
7 **************************************************************************/ 7 **************************************************************************/
8 8
9 // Change html class name from "no-js" to "js" 9 // Change html class name from "no-js" to "js"
10 document.documentElement.className = "js"; 10 document.documentElement.className = "js";
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 } 187 }
188 188
189 Accordion.prototype._onClick = function(event) 189 Accordion.prototype._onClick = function(event)
190 { 190 {
191 if (!event.target.classList.contains("accordion-toggle-button")) return; 191 if (!event.target.classList.contains("accordion-toggle-button")) return;
192 192
193 this.toggleSection(event.target); 193 this.toggleSection(event.target);
194 } 194 }
195 195
196 var accordions = document.getElementsByClassName('accordion'); 196 var productTopicsAccordion = document.getElementById('product-topics-accordi on');
197 for (var i = 0; i < accordions.length; i++) 197 if (productTopicsAccordion)
198 { 198 {
199 new Accordion(accordions[i]); 199 new Accordion(productTopicsAccordion);
200 } 200 }
201 201
202 }, false); 202 }, false);
203 }()); 203 }());
OLDNEW
« 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