I am making a custom archive page, that will display the list of posts with their excerpt, and a button that when clicked toggles the rest of the post content. I have it working with this code, except that it toggles EVERY post content lol because in the loop they all get the class you know what I mean?
Can you help me fin a way to do this? There has to be a way to make it work in the loop right? Here is the (fail) code I have thus far, Thank you! `
<div id="more_content">
<a href="#" class="see_all">More</a>
<div class="content_hidden" style="display:none;">
<div class="copy">
<?php the_content(); ?>
</div>
<p class="tags"><?php the_tags(); ?></p>
<?php comments_template(); ?>
</div>
</div>
<script type="text/javascript" charset="utf-8">
$('.see_all').click(function() {
if ( $(this).html() == 'More'){
$('.content_hidden').toggle('slow');
$(this).html('Less');
}
else if ( $(this).html() == 'Less'){
$('.content_hidden').slideUp('slow');
$(this).html('More');
}
return false;
});
`