title: jquery: click for every id-element starting with
body: <p>I tried to find all <code>id</code>s starting with the string &quot;matchItem_&quot; and define a click-event for each. onclick i want wo execute a script with a URL parameter and change the image in this id-element. Unfortunately my syntax isn't right, I also tried with <code>.each.function</code> but I didn't get it.</p>
  <pre><code>$('[id^=&quot;matchItem_&quot;]').each {
      
      $(this).click(){
       //...execute my script.php?urlparam=xx....;
       $(this).find('img').attr('src','/admin/images/ok.png');
      }
  
  }
  </code></pre>