Hi,
I am using a bit of jquery to show and hide content if title h2 is clicked.
The problme is as there are many title h2 (within a loop) when i click on only title h2 it shows the content of all the h2 content.
my code is
<pre lang='javascript'>jQuery(document).ready(function() {
jQuery('#p').hide();
jQuery('h2').click(function() {
jQuery('h2+p').slideToggle(400);
return false;
});
});
I would appreciate any help as i don t know how to fix it.
Cannot give an unique id to the tile h2 because of belonging to the loop i ll get class..
One idea?
Even if not with jquery ,i ll take it:)