Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About tonygildon86

  • Rank
  1. Hello donesuk, I really appreciate your response. I have been at this all day trying to adjust this code to work for me. Would you be able to make your suggested changes to the script below? I am still very new at this, but I have been learning a ton from this forum and w3schools. // For each button, assign an event handler var acc = document.getElementsByClassName("accordion"); for (var i = 0; i < acc.length; i++) { acc.addEventListener("click", accordion); } // Event handler function function accordion() { // Reset all of the elements for(var i = 0; i < acc.length;
  2. I am looking for assistance with my accordion code shown below. It functions perfect, but I am trying to get it so that when a panel is clicked and opened, if it is clicked again it will also close. I also want it to still close if another panel is clicked and opened, which is already working great thanks to you. <style> button.accordion { background-color: #262624; color: #f98100; cursor: pointer; padding: 18px; width: 100%; border: none; text-align: left; outline: none; font-size: 18px; transition: 0.4s; font-family: Playf
  • Create New...