reading xml whit jQuery

reading xml whit jQuery

Hey,

I'm trying to build some sort of image viewer whit jQuery and XML. I've found out how to read an XML whit jQuery but I want MORE!!! Haha, here's the deal, I've got 15 or more images in my XML file which will be expanded throughout the time, but I want to display only 10 image at a time. I thought solving this problem was easy, just build in a for loop just like in flash, but that didn't work so.... Suggestions anyone? Here's my code below...
  1. $(function() {
         $(document).ready(function() {
             $.ajax({
                 type: "GET",
                 url: "rss/cases.xml",
                 dataType: "xml",
                 success: function(xml) {
                   
                   
                               $(xml).find('item').for(var i=0;i<10;i++){  function(){
                       
                         
                                   var id_text = $(this).attr('id')
                                   var name_text = $(this).find('image').text()


                               $('<div class="cases_thumbs"></div>')
                                       .html('<img src="' + name_text + '" alt="' + id_text + '"/>' + i)
                                       .appendTo('.cases_banner');
                       
                        
                              } //close function
                        } //close for loop
                   
             }); //close $.ajax(
         }); //close click(
     }); //close $(