Target a specific page in a page list with slideToggle()
Permalink
Hello
I have used this code:
to create a slideToggle between a truncated page description and the full description that appears as part of a page list template. My problem is that when I click on my "more info" button to trigger the slideToggle, all the pages in the page list toggle their descriptions.
Is there a way to alter the code above to target just the page that was clicked on?
any help is appreciated
I have used this code:
<script type="text/javascript"> $(document).ready(function(){ $(".trigger").click(function(){ $(".panel").toggle("fast"); $(this).toggleClass("active"); return false; }); }); </script>
to create a slideToggle between a truncated page description and the full description that appears as part of a page list template. My problem is that when I click on my "more info" button to trigger the slideToggle, all the pages in the page list toggle their descriptions.
Is there a way to alter the code above to target just the page that was clicked on?
any help is appreciated