6/28/2016 - 4:42 PM

simple accordeon with JQuery

simple accordeon with JQuery

<!-- JS -->
<script type="text/javascript">
  $(document).ready(function($) {

      //Expand or collapse this panel

      //Hide the other panels


<!-- CSS -->
  .accordion-toggle {cursor: pointer;}
  .accordion-content {display: none;}
  .accordion-content.default {display: block;}

<!-- HTML -->
<div id="accordion">
  <h4 class="accordion-toggle">Accordion 1</h4>
  <div class="accordion-content default">
    <p>Cras malesuada ultrices augue molestie risus.</p>
  <h4 class="accordion-toggle">Accordion 2</h4>
  <div class="accordion-content">
    <p>Lorem ipsum dolor sit amet mauris eu turpis.</p>
  <h4 class="accordion-toggle">Accordion 3</h4>
  <div class="accordion-content">
    <p>Vivamus facilisisnibh scelerisque laoreet.</p>