title: a simple confusion in jquery
body: <pre><code> for(var m=1;m&lt;=26;m++)
  {
  
  $("#letter"+m).click(function() {
      $("#letter1").attr('value', m); 
      j = 0;
  
      setValue(this.value, length);
      changeImage("#img");
  })
  }
  </code></pre>
  
  <p>in the above code , all goes exactly as expected but the only problem is: when I click letter1,letter2 and so on the value on letter1 should be 1,2 and so on respectively  as I expect </p>
  
  <pre><code>$("#letter1").attr('value', m);
  </code></pre>
  
  <p>but the value is always 27 on clicking any button, why?</p>