Jump to content

MCW

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MCW

  • Rank
    Newbie
  1. I am pretty new to this, or several years removed being more like it. I replaced toggle with contains. How else would I change this. Thanks! <script> var coll = document.getElementsByClassName("collapsible"); var i; for (i = 0; i < coll.length; i++) { coll.addEventListener("click", function() { this.classList.contains("active"); var content = this.nextElementSibling; if (content.style.display === "block") { content.style.display = "none"; } else { content.style.display = "block"; } }); } </script>
  2. https://www.w3schools.com/howto/howto_js_collapsible.asp Whenever I use the code modified or direct into an html, it works in Edge, Chrome and Firefox and not in IE. Any idea what would cause this? Thanks!
×
×
  • Create New...