Speed up development with full-stack environments for every branch.

Learn More

How to add accordion using jQuery.

8411 Runs 27047 Views 11567 Copies
Saved

Saved

dipesh.parmar 55

dipesh.parmar
published 4 years ago

<!doctype html>
  
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Accordion - Default functionality</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  <script>
  $(function() {
    $( "#accordion" ).accordion();
  });
  </script>
</head>
<body>
 
<div id="accordion">
  <h3>First Section</h3>
  <div>
    <p>
  Content for section first
    </p>
  </div>
  <h3>Second Section</h3>
  <div>
    <p>
	Content For Second Section
    </p>
  </div>
  <h3>Third Section</h3>
  <div>
    <p>
	Content for third section with extra html
    </p>
    <ul>
      <li>List item one</li>
      <li>List item two</li>
      <li>List item three</li>
    </ul>
  </div>
</div>
 
</body>
</html>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).