passing variables into an inline function...[solved]

passing variables into an inline function...[solved]

Hello all,

I am trying to use jQuery to populate a number of divs with html from external blog pages:
  1. for(var i = 1;i<=3;i++){
  2. $.get("http://my.project.url/?cat=whatever&pag="+i,function(data){
  3. $("#whatever_div_"+i).html(data);
  4.          });
  5. }
I understand that the 'i' variable is out of the scope of the inline function but I really don't know any other way of doing this.  Can anyone help me pass i into the function please?

Thank you

Paul