I am having a problem with a script on this website I try to build. This is the script itself:
var id=0;
var cases=$('.cases').length;
$('#show').html($('#'+id).html());
setInterval(function()
{
$('#show').empty();
if (id==cases-1)
id=0;
else
id++;
$('#show').html($('#'+id).html());
},5000);
this is the html code:
<div class="page">
<br /><br /><headline>cases</headline><br /><br /><div id='case'></div><div class='content'><div id='show'></div><div id='column1'><div class='cases' id='0'><div class='short'><div id='cases-image'><img src='images/Sunset.jpg'/></div><div id='cases-info'><div id='cases-headline'>zxfbzsxdbfsdfh</div><cases-text>dfghsdfgsdfgsdfg</cases-text><div class='more' id=zxfbzsxdbfsdfh >להמשך קריאה...</div></div></div></div></div><div id='column2'><div class='cases' id='1'><div class='short'><div id='cases-image'><img src='images/גלריה1.bmp'/></div><div id='cases-info'><div id='cases-headline'>xbzsdfbsdf</div><cases-text>dafasdvasdvasdv</cases-text><div class='more' id=xbzsdfbsdf >להמשך קריאה...</div></div></div></div></div> </div>
<div id="footer">
</div>
It works in jsFiddle, but it doesn't work on my computer, it only shows the first case, the id in the script changes, but it doesn't get the html from the other cases... Can you help me?