Need script to fire a popup when cart have item and user close window -- 2

Job ID: 31963474

Budget: $10 – $30 USD

Need a script to show a popup on window/tab close. It function will be following
When any user try to close the window or tab. if cart have any item then it will show a popup to notify the user that "Your cart have no of items". that popup will have two button "Proceed the cart" or "Cancel the cart". if user click on "Proceed the cart" then it will redirect to cart page. if user click on "Cancel the cart" then it will close the window.
It is just 1 hour work.
Related categories: PHP JavaScript AJAX HTML jQuery