I'm looking for code which does the following: When a visitor visits my website and clicks anywhere on the page, (regardless of where the mouse clicks) it will automatically redirect him to another site. I think an event listener might be a solution, but I'm not sure. Thanks a lot for any help on this If possible, I would like there to be a 2 second time delay before it does the redirection.
Just use a jQuery click function (for the body) and a window.location. Just 2 lines of code, you don't need a script.
Can you please show me the code that can do that? I'm not experienced with coding as much as I'am with being a webmaster.
There's a ton of javascript repositories out there. You might be able to find what you're looking for there. Just do a Google search.
try this <body onclick="window.location='http://your-url.com';"> ........................................ ................ your page .................................... ....................... </body>