Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<style>
.accordion {
  background-color: #f7f7f7 !important;
  color: #444 !important;
  cursor: pointer !important;
  padding: 18px !important;
  border: none !important;
  width: 100%;
  text-align: left !important;
  outline: none !important;
  font-size: 15px !important;
  transition: 0.4s !important ;
}

.active, .accordion:hover {
  background-color: #efefef !important; 
}

.panel {
  padding: 0 18px  !important;
  display: none ;
  background-color: white !important;
  border: none !important;
  overflow: hidden  !important;
}


.accordion:after {
  content: '\02795'; /* Unicode character for "plus" sign (+) */
  font-size: 13px ;
  color: #777 ;
  float: right ;
  margin-left: 5px;
}

.active:after {
  content: "\2796" ; /* Unicode character for "minus" sign (-) */
}

</style>
<script>
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}
</script>

Image Removed  
We want to hear from you! We're always looking to improve our developer guides. 
Please email your suggestions to devguidefeedback@serviceobjects.com.