collapse row by row with (jQuery)
- by Mini
I want to hide/show a lot of contents by id
Here is an example:
<a href="#" class="click"> title here </a>
<p class="content" id="1">
text here ...
</p>
<a href="#" class="click" id="2"> another title here </a>
<p class="content">
another text here ...
</p>
I can add an ID into my HTML code.
How Can I get it by jQuery?
The jQuery lines:
<script type="text/javascript">
$(document).ready(function(){
$('.content').hide();
$('.click').click(function() {
$('.content').slideToggle(500);
return false;
});