I am trying to make a html page with multiple divs that will be shown when certain links are clicked. Here is an example
Home page: page 1, page 2
When i click page 1 it goes to.. Page 1:
Page3, Home
when i click home it goes to.. home page:
page 1,page 2
However when i then click page 1 or page 2 nothing happens and it stays on the same div. is there a script to not only show different divs on click but keep the loop going forever?
thanks.
code below
var $prehashval = "";
function loop()
{
if (location.hash.slice(1)!=$prehashval)
hashChanged();
$prehashval = location.hash.slice(1);
setTimeout("loop()");
}
function hashChanged()
{
var $output;
switch (location.hash.slice(1))
{
default:
$output = location.hash.slice(1);
}
}
loop();