title: JQuery Selector for dynamic id
body: <p>I am trying to change the image source in the Jquery </p>
  
  <pre><code>&lt;a href="" class="wanted" id="'.$status_id[$num].'"&gt;&lt;img src="/images/wanted.png"&gt;
  </code></pre>
  
  <p>through a JQuery selector:</p>
  
  <pre><code>$(".wanted "+ id).attr("src", '/images/wanted_.png');
  </code></pre>
  
  <p>Where <code>id</code> is defined in the javascript as the php variable <code>$status_id[$num]</code>. I first tried using <code>$(this)</code> to no avail. Any insight would be helpful.</p>