title: jQuery - Change image based on click
body: <p>Currently I have a heading with a downwards pointing icon. If the header is clicked, I want the image to change to an upwards one.</p>
  
  <p>I have tried using the "?" operator to query if it is, but I am not 100% sure how it works. I'm using this code at the moment.</p>
  
  <pre><code>// Toggle message_body
  $(".message_head").click(function(){
      var id = $(this).attr("id");
      $(this).next(".message_body").slideToggle(500);
      $(".icon[id=" + id + "]").attr("src", "../images/admin/Symbol_Down.png" ? : "../images/admin/Symbol_Up.png");
      return false;
  });
  </code></pre>
  
  <p>I know this code does not work. Could someone please show me how? Thanks!</p>