Toggle 1 <div> at a time with Image Changing using JQuery
- by dg
Please see this site: http://www.sensationsskin.com/site10/treatments/skin-care.html
I've got it working, but am wanting the "+" to change to the "-" (expandbutton-close.gif). I'm using CSS right now to pull up the image, but I think I need to incorporate it into the JQuery code?
<script type="text/javascript">
$(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(){
if ( $(this).next(".msg_body").is(':visible') ) {
$(".msg_body").hide();
} else {
$(".msg_body").hide();
$(this).next(".msg_body").slideToggle(450);
}
});
});
</script>