Hi guys I have something that I am not sure how to figure out. I have some jquery code that auto hides a section of text. then a hyperlink to toggle showing or hiding the text.
Here is an example: <script type="text/javascript"> $(document).ready(function(){ $('.comments').hide(); $('.attachments').hide(); $(".buttonslidedown").click(function() { $(".comments").slideToggle("normal"); }); $(".buttonslidedown2").click(function() { $(".attachments").slideToggle("normal"); }); }); </script> <a href="#" class="buttonslidedown">View/Hide Comments</a> : <a href="#" class="buttonslidedown2">View/Hide Attachemnts</a> <div class="comments"> <p>Comments <br><br> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras sit amet sapien eu nisi malesuada tincidunt. Aliquam erat volutpat. Mauris non dolor. Sed metus lacus, volutpat eget, euismod ut, blandit sit amet, quam. Phasellus feugiat mattis dolor. Praesent tincidunt nisl sed neque. Curabitur fringilla, enim ac vehicula lobortis, elit purus pharetra odio, vitae suscipit quam dui id pede. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis fermentum, metus eu facilisis sodales, elit velit euismod ante, vel faucibus neque purus et turpis. Praesent metus. Sed id orci. Vestibulum sodales felis nec neque. Duis dolor. </p> </div> <div class="attachments"> <p>Attachments <br><br> <a href="#">Filenet Document Or Link</a><br> <a href="#">Filenet Document Or Link</a><br> <a href="#">Filenet Document Or Link</a><br> </div> The problem is that I am going to make this dynamic so that code above repates for as many records is in a database. On my current screen i have three of these groups and you probably have guessed if I click on one link (because the class is shared) all divs open and close witht he toggle. How can I get around this? Thanks Frank