changing background image with a for loop
<p>i have a table with 3 cells the middel 1 in a black image so it will look like there is a line in the middle of the screen.
now in the other cell i want to show pictures, so i tryed to do a loop that changing the images every second with by hiding the cells and then show them.</p>

<p>the script:</p>

<pre><code>$(window).ready(function () {

//the images sits in a div with a hidden property.
var AlumniumPictures = $("#AlumnimPictureHolder").children();
var ShipozimPictures = $("#ShipozimPictureHolder").children();

//var timer = $.timer(yourfunction, 10000);

for (var i = 0; i &lt; 10; i++) {


    $(".almoniyomButtonTD").css({
        "background-image": "url(" + $(AlumniumPictures[i]).attr('src') + ")"
    });

    $(".shipozimButtonTD").css({
        "background-image": "url(" + $(ShipozimPictures[i]).attr('src') + ")"
    });

    $(".almoniyomButtonTD").hide();
    $(".shipozimButtonTD").hide();


    $(".almoniyomButtonTD").show(1100);
    $(".shipozimButtonTD").show(1100);

   //for some reson the code dosnt work if im not using the setInterval method.
   document.setInterval(1000);


}
</code></pre>

<p>});</p>

<p>this is not working it only show me the first images and then stop.
is there a batter way to do this?
am im doing this right?</p>
