Core-X Core-X - 8 months ago 14
Javascript Question

popup window when user click anywhere on the page [jQuery & Html]

i want to know how can i popup a window to a particular website when user clicks anywhere on the page.just like popup companies.Am i able to do that in html using javascript & jQuery ?
i would much appreciate any help.

Answer

Bind the click to the body and enter the url

$('body').click(function(){
  window.open('www.google.co.uk', 'New Window', 'height=200,width=200');
  return false;
});