How to implement onbeforeunload behavior for a div?
<p>I posted recently regarding onbeforeunload implementation. Its working now but that only solved half of the problem. My application has lot of tabs and I want to throw this same confirmation to user if he clicks on a new tab without saving changes. all the tabs are div elements. How do you implement something of this sort?
Sample tab structure is attached, where every tab loads a new page.<img src="http://i.stack.imgur.com/3ooQj.png" alt="enter image description here"></p>
