Surely I'm missing something very basic here. I wrote the getXML function below to get data from an XML file and create a table row with photo thumbnails. It ONLY works if I uncomment the alert near the bottom of the function. What makes this even odder is that the alert only displays '<tr> </tr>'. If I include an alert within the each loop it displays all of the <td> and <img> tags that are being added as the XML file is traversed, but the thumbnails aren't displayed as they are with the alert that only displays the table row tags. I've tried running this from both $(document).ready(function () and Window onload and the behavior is the same.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">