[jQuery] What does this mean?
What does the "o" and "i" represent in this code?
Are they just selected randomly (i.e., could they
have been "r" and "s" just as easily?) or are they
special characters in JS?
I need to create add a section of code to the function
below that will create a list of section_id values to correspond
with the show_order values that the code is already creating.
Something like:
$("#sortable-tbl").tableDnD();
$('#frm-sort').submit(function(){
var sRowOrder = "";
var sIdOrder = "";
$("#sortable-tbl tr").each(function(i,o){
if (sRowOrder.length) {
sRowOrder += "," + o.id;
} else {
sRowOrder = o.id;
}
if (sIdOrder.length) {
sIdOrder += "," + o.id;
} else {
sIdOrder = o.id;
}
});
$('#section_order').val(sRowOrder);
$('#section_ids') .val (sIdOrder);
});
});
But I know the use of o.id for the sIdOrder section
is probably wrong. I just don't know what the "o" stands
for, in particular.
Help, anyone?
Thanks,
Rick