Streaming live at 10am (PST)

The popup when exiting a site help


How to add custom code to show the popup when exiting a site?Thanks

$(document).on('click', 'a', function() {
  if(this.href.indexOf('http') == 0 && this.href.indexOf(location.hostname) == -1) {
    return confirm('Are you sure you want to leave this site?');


Thanks @samliew

I want to create popup with form that can collect email, Like this one, when try to exit page, it show,

Can you show me an simple demo?

Thank you very much:laughing:


For specific/advanced custom coding services, you may contact me here