"Responsive Accordion Menu"
Bootstrap 3.3.0 Snippet by raviashar

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <h3 class="text-center">Accordion Menu</h3> <div class="accordion_panel"> <div class="accordion_panelbox in active"> <div class="accordion_title toggle"> <h4>Lorem Ipsum</h4> </div> <div class="accordion_content"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> </div> <div class="accordion_panelbox"> <div class="accordion_title toggle"> <h4>Lorem Ipsum</h4> </div> <div class="accordion_content"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> </div> <div class="accordion_panelbox"> <div class="accordion_title toggle"> <h4>Lorem Ipsum</h4> </div> <div class="accordion_content"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> </div> <div class="accordion_panelbox"> <div class="accordion_title toggle"> <h4>Lorem Ipsum</h4> </div> <div class="accordion_content"> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> </div> </div> </div>
a:hover , a:focus{ text-decoration: none;} ul{ margin: 0px; padding: 0px;} ul li{ list-style-type: none;} .clear{ clear: both;} /*Accordion css start*/ .accordion_panelbox{ margin-bottom:15px;} .accordion_panelbox.active .accordion_title h4{ background:url(images/minus.png) no-repeat right center;} .accordion_title{ border: 1px solid #999; padding: 10px 15px; cursor: pointer;} .accordion_title h4{ font-size: 17px; background: url(images/plus.png) no-repeat right center; margin: 0px;} .accordion_content{ border: 1px solid #999; border-top: 0px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; padding: 10px 15px; background: #f2f2f2; display: none;} .accordion_panelbox.in .accordion_content{ display: block;} /*Accordion css end*/
$('.toggle').click(function(e) { e.preventDefault(); var $this = $(this); if ($this.parent().hasClass('active')) { $this.parent().removeClass('active'); $this.next().slideUp(350); } else { $this.parent().parent().find('.accordion_panelbox').removeClass('active'); $this.parent().parent().find('.accordion_content').slideUp(350); $this.parent().toggleClass('active'); $this.next().slideToggle(350); } });

Related: See More


Questions / Comments: