I am retrieving HTML from a remote host with the following jQuery code
var loadUrl = \"URL.html\"; $(\"#result\") .html(ajax_load) .load(
Try this:
$(function(){
var xml = "";
$('tr:not(:first)').each(function(i, tr){
$tr = $(tr);
var index = $.trim($tr.find('td:first').text());
xml += '';
$tr.find('td:not(:first)').each(function(j, td){
xml += '';
xml += $.trim($(td).text());
xml += '';
});
xml += ' ';
});
alert(xml);
});
Example here.
If you'd be using and
you could still simplify it slightly further.