title: JQuery callback question
body: <p>I'm trying to assign a different number to different callback functions in jquery. </p>
  
  <pre><code>for (i=o;i&lt;types.length;i++) {
       $('#ajax'+types[i]+'Div').html('Loading...').load('searchAjax.php','new=u',function () { $(this).find('select').change( function() { AjaxDiv(i); } ) } );
  }
  </code></pre>
  
  <p>Everytime I run this section of code, i is 5 for each call to ajaxDiv because it is calling a global variable. I'm not sure if I can either change the scope of i or if there's a way to print the value in the change function. Any ideas?</p>
  
  <p>Thank you in advance! Happy Thanksgiving!</p>
  
  <p>Andrew</p>