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:
- for(var i = 1;i<=3;i++){
- $.get("http://my.project.url/?cat=whatever&pag="+i,function(data){
- $("#whatever_div_"+i).html(data);
- });
- }
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