Javascript functions working only by explicit coding and not in a for cycle
<p>I have the following Javascript code that works perfectly:</p>

<pre><code>$(document).ready(function() {   
  $("#Select1").setDefault();    
  $("#Select2").setDefault();     
  $("#Select3").setDefault();      
  $("#Select4").setDefault();   
  $("#Select5").setDefault();      
  $("#Select6").setDefault();   
});  
</code></pre>

<p>Now, If I use the following compact code it doesn't work:</p>

<pre><code>$(document).ready(function() {
  for(i=1; i&lt;=6; i++){
    $("#Select"+i).setDefault();    
  }
}); 
</code></pre>

<p>The <strong>for</strong> works fine if I write:</p>

<pre><code>for(i=1; i&lt;=6; i++){
    alert(i);    
}
</code></pre>

<p>Any idea?</p>

<p>PS: I use Chrome and Firefox</p>
