Foundation Accordion

by labanino

HTML

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/js/foundation.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/js/foundation/foundation.accordion.min.js"></script>
<dl class="accordion" data-accordion>
  <dd class="accordion-navigation">
    <a href="#personal">Personal Injury</a>
    <div id="personal" class="content active">
      <p>Personal injury law refers to the legal remedies and defenses involved in civil lawsuits brought as a result of wrongful conduct. In fact, the word “tort” comes from a Latin term meaning twist, wrong, or harm. In contrast to criminal law, a tort
        action does not involve the government prosecuting the wrongdoer.</p>

      <p>Most personal injury cases are based on the doctrine of negligence. In essence, negligence requires every member of society to act responsibly and avoid putting others at risk. Once negligence has been established in a personal injury case, the
        defendant must pay the plaintiff for all injuries caused by the defendant’s actions. Certain types of damages are easy to calculate, such as property damage and medical bills. For other types, such as emotional distress and loss of earning capacity,
        expert testimony may be required. Punitive damages, meant to punish and deter particularly egregious conduct, may also be available.</p>

      <p>Our attorneys provide professional legal representation for clients who have been hurt as a result of:</p>
      <ul>
        <li>Car accidents, including those involving uninsured and underinsured motorists</li>
        <li>Truck accidents</li>
        <li>Bus accidents</li>
        <li>Motorcycle, bicycle and pedestrian accidents</li>
        <li>Drunk driving accidents</li>
        <li>Boating accidents</li>
        <li>Slip-and-fall and premises liability accidents</li>
        <li>Dog...

JavaScript

$(document).foundation();

$(".accordion").on("click", "dd", function(event) {
  $("dd.active").find(".content").slideToggle("fast");
  $(this).find(".content").slideToggle("fast");
});