Quick and simple jQuery accordion

A simple jQuery snippet for those times when you don’t need an entire plugin, but just something quick, and on the spot.

<ul class="accordion">
		<div class="heading">Lorem ipsum dolor</div>
		<div class="content">
			Lorem ipsum dolor sit amet...
$('.accordion .content').hide();

$('.accordion .heading').click(function(){

See demo here.

Leave a Reply

Your email address will not be published. Required fields are marked *

− 1 = 1

This site uses Akismet to reduce spam. Learn how your comment data is processed.