Hi

Can anyone help? I'm trying to toggle a class on the span .arrow when
you click .msg_head. I have several classes of .arrow on the page and
only want to toggle the class of the span within the element i'm
clicking. This is my code - but it doesn't work... any advice?

Thanks

Craig


$(".msg_head").click(function(){
                $(this).next(".msg_body").slideToggle("slow");
                $(this).next(".arrow").toggleClass("arrow_up");
        });



 <div class="msg_list">
            <div class="panel">
              <div class="msg_head">Design supplied by us<span
class="arrow"></span></div>
              <div class="msg_body m10">
                <p>orem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit </p>
                <p class="last"><a href="designsupplied.php">Design by
you</a></p>
              </div>
            </div>
            <div class="msg_head">Design supplied by you<span
class="arrow"></span></div>
            <div class="msg_body">
              <p>orem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit </p>
              <p class="last"><a href="design.php">Design by you</a></
p>
            </div>
          </div>

Reply via email to