/ Published in: jQuery

Show/hide an paragraph when you click on the h2, suppose you have:
<a href="#">Designer info</a>
<p>Lorem ipsum dolor sit amet.</p>
You can show/hide the paragraph with the code below.
<a href="#">Designer info</a>
<p>Lorem ipsum dolor sit amet.</p>
You can show/hide the paragraph with the code below.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('h2').click(function() { $(this).next().toggle('slow'); })
Comments
