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

Learn More

How to add accordion using jQuery.

8744 Runs 28141 Views 11953 Copies


dipesh.parmar 55

published 4 years ago

<!doctype html>
<html lang="en">
  <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>
  $(function() {
    $( "#accordion" ).accordion();
<div id="accordion">
  <h3>First Section</h3>
  Content for section first
  <h3>Second Section</h3>
	Content For Second Section
  <h3>Third Section</h3>
	Content for third section with extra html
      <li>List item one</li>
      <li>List item two</li>
      <li>List item three</li>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).