Hi all,
I'm trying my first bit of jQuery code but am familiar with Java programming. I'm trying to create a function that loads a div with an image in it, which will fade in and then after 4 seconds move onto the next image. I want it to create an infinite loop but it doesn't work.
<script type="text/javascript">
$(document).ready(function ()
{
var slide=true;
while (slide==true)
{
var i=1;
for(i=1;i<3;i++)
{
$(#main[i]).fadeIn('200');
setTimeout(4000);
$(#main[i].hide();
if (i==2)
{
i=1;
}
}
}
});
</script>
How do I fix this?
Cheers,