javascript - How this site shows a neat HTML box before you leave -


on site: http://shirtjs.com/product-category/collections/zeptojs/

when move cursor out of html page (about go close tab) show "wait before leave!" modal centered div.

tldr:

this doesn't occur if 'leave' html page through sides or bottom of browser window.

is common js library, custom made, ...

there's 2,000,000 libraries loaded on site! haven't been able trace js code bottom of this.

any idea how it?

found it:

ouibounce lib.

https://github.com/carlsednaoui/ouibounce

thanks efforts :)


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -