Skip to content Skip to sidebar Skip to footer

Fade And Replace Image With Other Image Depending On Hash

First, here is my crazy code that you will hate So I have this image that I want to replace with a jQuery fade effect whenever the hash changes. I want for it to check the hash on

Solution 1:

You need to use onload plus hashchange

window.onload       = checkHash;
window.onhashchange = checkHash;

functioncheckHash() {
    // check stuff
}

Working Fiddle :: careful hash does change :-)

http://jsfiddle.net/R9cNW/9/

Post a Comment for "Fade And Replace Image With Other Image Depending On Hash"