I've been asked by a friend to set up a web page whose background changes only once when any of the links are clicked. I've tried a few examples given on this site and looked at a few on Google, but they are pretty much all gallery-style cyclical changes. Perhaps I'm just frustrated and not seeing the trees for the forest...
The page is @ mysite/julie The images are @ mysite/julie/images/blogbka.png and /images/blogbk.png
I used the solution found below ( https://stackoverflow.com/a/11362465/1506620 )
Thank you all for your help.
var is=true;
document.body.onclick = function( e ) {
if ( e.target.tagName === 'A' ) {
if(is){
document.body.style.background='url(http://adultdave.co.uk/julie/images/blogbka.png)';is=false;}
}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With