jQuery syntax order
<p>Please pardon me as I am still a novice at jQuery and I'm more comfortable using others code than writing it myself.
My question pertains to this line, specifically:</p>

<pre><code>$('r1.lastrow td.cell.c0').html(page).each(function(index, content) {
</code></pre>

<p>Is the html(page) in the correct syntax order?  How do you tell?</p>

<pre><code>$.get('---------------/learn/mod/lesson/report.php?id='+lesson+'&amp;action=reportdetail&amp;userid='+userid+'&amp;try='+lastAttempt, success: function(data) {
        var page = $(data);

        var lessonArray= new Array();
        //loop through each element and grab the text

        $('tr.r1.lastrow td.cell.c0').html(page).each(function(index, content) {
            score=parseInt(content.substr(content.length - 1));
            lessonArray[index]=score;
        }); 

    allLessonsArray[name]=lessonArray;
    });
</code></pre>

<p>Edit: I'm having another problem, this time mainly due to my inexperience with jQuery.</p>

<pre><code>userid= 17320;
courseid=4745;
allLessonsArray=script(userid, courseid);
function script(userid, courseid){


var lessonInTopicSectionArray= new Array();
lessonInTopicSectionArray['Floods, external']=376;

var allLessonsArray= new Array();
$.each(lessonInTopicSectionArray, function(name, lesson){


    lastAttempt = 0;
    url='----/learn/mod/lesson/report.php?id='+lesson+'&amp;action=reportdetail&amp;userid='+userid+'&amp;try='+lastAttempt;
    $.get(url, function(data) {
        var page = $(data);

        var lessonArray= new Array();
        //loop through each element and grab the text

        $('tr.r1.lastrow td.cell.c0').html(page).each(function(index, content) {
            score=parseInt(content.substr(content.length - 1));
            lessonArray[index]=score;
        }); 
        alert(name);
    allLessonsArray[name]=lessonArray;  
    });
});
return allLessonsArray;
}
</code></pre>

<p>How do I return allLessonsArray from the previous loop so I can return allLessonsArray?  I'm not thoroughly understanding the object oriented aspects of jQuery, so an explanation would be nice.</p>
