views:

15

answers:

0
 $(window).bind('beforeunload',function(){
 alert('closing');
 })

Above code only seems to work for desktop browsers.