Hi, I know nothing about Javascript and I'm trying to embed some into my website. I want to have a h2 tag that toggles appearing/disappearing (by default it is not hidden) on click of a p tag and then while the h2 tag is disappearing another p tag will appear (and toggle). I found this on a forum:
<script type="text/javascript">
$(document).ready(function(){
$(".msg_body").hide();
$(".msg_head").click(function()
{
$(this).next(".msg_body").slideToggle();
});});
</script>
But this only toggles one thing. Can anyone help me?
<script type="text/javascript">
$(document).ready(function(){
$(".msg_body").hide();
$(".msg_head").click(function()
{
$(this).next(".msg_body").slideToggle();
});});
</script>
But this only toggles one thing. Can anyone help me?