I am looking to create an accordion effect with the structure provided below. The goal is to have the corresponding article toggle when clicking on .booklist>li>a, allowing only one article to be open at a time. Can someone assist me with writing this script? Jquery implementation is encouraged.
http://jsfiddle.net/vinicius5581/r2zevb3d/1/
CSS
article{
display:none;
}
HTML
<section>
<ul class="booklist">
<li>
<a>Article Name 1</a>
<article>
<p><content</p>
<img class="left" src="myimage"/>
<p>more content</p>
</article>
</li>
<li>
<a>Article Name 2</a>
<article>
<p><content</p>
<img class="left" src="myimage"/>
<p>more content</p>
</article>
</li>
<li>
<a>Article Name 3</a>
<article>
<p><content</p>
<img class="left" src="myimage"/>
<p>more content</p>
</article>
</li>