Posted By

montanaflynn on 06/18/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

radarseven
vali29


jQuery Expandable Divs


 / Published in: jQuery
 

URL: http://blog.complimedia.com/2009/04/expandable-divs-jquery/

  1. <script type="text/javascript">
  2. // load script once the page is done loading //-->
  3. $(document).ready(function(){
  4. //hide the all of the element with class msg_body
  5. $(".msg_body").hide();
  6. //toggle the componenet with class msg_body
  7. $(".msg_head").click(function()
  8. {
  9. $(this).next(".msg_body").slideToggle(600);
  10. });
  11. });
  12. </script>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: montanaflynn on June 19, 2009

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.

You need to login to post a comment.