I have some code that reads an xml file and outputs to a table.  I
would like the rows to have alternate colors but cannot get it to work
properly.  Below is my code.  Hope someone can help.

Thanks!
  <script src="../jQuery/jquery-1.3.1.min.js" type="text/javascript"></
script>

<style type="text/css">
        tr.alt td {background:#e1e7e8;}
        tr.over td {background::#99a4a4;}


</style>
     <script type="application/javascript">
         $(document).ready(function(){
             $.ajax({
                 type: "GET",
                 url: "FTF_OLL.xml",
                 dataType: "xml",
                 success: function(xml) {
                     $(xml).find('Document').each(function(){
                         var title_text = $(this).find('Title').text()
                         var type_text = $(this).find('Type').text()
                         var format_text = $(this).find('Format').text
()
                         var location_text = $(this).find
('Location').text()
                         var track_text = $(this).find('Track').text()
                         var company_text = $(this).find
('Company').text()

                         $('<tr></tr>')
                             .html('<td>' + title_text + '</td><td>' +
type_text + '</td><td>' + format_text + '</td><td>' + location_text +
'</td><td>' + track_text + '</td><td>' + company_text + '</td>' )
                             .appendTo('#update-target table');
                     }); //close each(
                 }
             }); //close $.ajax(
 }); //close $(
     </script>
   </head>
   <body>
     <p>
       <div id='update-target'>
         <table class="stripeMe"><tr><td>Title</td><td>Type</
td><td>Format</td><td>Location</td><td>Track</td><td>Company</td></
tr></table>         </div>
     </p>

Reply via email to