I've got the following code:
I want to call a function based on what the hash is. Clearly I'm doing something wrong because this code doesn't work. Help!
Code:
var hash = location.hash;
setInterval(function()
{
if (location.hash != hash)
{
hash = location.hash;
callFn = location.hash.substring(1);
callFn();
}
}, 100);
Comment