Skip to main content
Topic: [FAQ] Broken Expand All Button (Read 878 times) previous topic - next topic

[FAQ] Broken Expand All Button

Since the last rewrite of the /faq page, the function "listExpansion()" used by the Expand button is no longer in /faq/faq.min.js.

Here is a quick-and-dirty implementation of the old functionality:
Code: [Select]
window.listExpansion = function() {
  var c = document.getElementById("expand");
  var b = document.getElementsByClassName("toggleAnswer");
  for (var i = 0; i < b.length; i++) {
    'Expand' === c.innerHTML.trim() ? b[i].style.display = 'block' : b[i].style.display = 'none';
  c.innerHTML.trim() == "Expand" ? c.innerHTML = "Collapse" : c.innerHTML = "Expand";

For toggling, replace the line in the for loop with this:
Code: [Select]
'block' === b[i].style.display ? b[i].style.display = 'none' : b[i].style.display = 'block';

Re: [FAQ] Broken Expand All Button

Reply #1
Yea, I noticed it late last night too. I will have it fixed soon :-) thanks!

Re: [FAQ] Broken Expand All Button

Reply #2
This is now fixed.