Sha256: 150f2799869ba20fdbce85e312a7a8c91ff90d9358b93d0caa578018e291a3fd

Contents?: true

Size: 577 Bytes

Versions: 13

Compression:

Stored size: 577 Bytes

Contents

function setupAccordion() {
  var accordions = document.querySelectorAll('.accordion');
  for(var i = 0; i < accordions.length; i++)
  {
    accordions[i].onclick = function(e) {
      if (e.toElement.type == 'checkbox') { return; }

      var accordionContent = this.parentElement.querySelector('.accordion__content');
      if (accordionContent != null) {
        if (getComputedStyle(accordionContent).display == "none") {
          accordionContent.style.display = "block";
        } else {
          accordionContent.style.display = "none";
        }
      }
    };
  }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
smock-0.1.182 app/assets/smock.js
smock-0.1.181 app/assets/smock.js
smock-0.1.180 app/assets/smock.js
smock-0.1.179 app/assets/smock.js
smock-0.1.178 app/assets/smock.js
smock-0.1.177 app/assets/smock.js
smock-0.1.176 app/assets/smock.js
smock-0.1.175 app/assets/smock.js
smock-0.1.170 app/assets/smock.js
smock-0.1.169 app/assets/smock.js
smock-0.1.168 app/assets/smock.js
smock-0.1.167 app/assets/smock.js
smock-0.1.166 app/assets/smock.js