/ Published in: jQuery
URL: http://blog.complimedia.com/2009/04/expandable-divs-jquery/
Expand |
Embed | Plain Text
<script type="text/javascript"> // load script once the page is done loading //--> $(document).ready(function(){ //hide the all of the element with class msg_body $(".msg_body").hide(); //toggle the componenet with class msg_body $(".msg_head").click(function() { $(this).next(".msg_body").slideToggle(600); }); }); </script>
Comments
Subscribe to comments
You need to login to post a comment.

thanks, I will take that advice! I had experienced a flash from the h2 background image changing with a :hover so I adopted a better technique using css but with one image and background-position instead of two images.