How do I ask for confirmation before changing tabs using Bootstrap 3 tabs?
<p>I have the standard tabs setup using Bootstrap 3.  Each tab is a form into which the user inputs information.  Now there is a save button at the bottom of each form which will save the information in the current tab, but what I'm looking to do is enable the user to click a different tab at the top of the page, and be given a warning of</p>

<pre><code> var areYouSure = confirm('If you sure you wish to leave this tab?  Any data entered will NOT be saved.  To save information, use the Save buttons.');
</code></pre>

<p>with an OK or Cancel button.  If they click OK then they go to the tab they clicked, and if they hit cancel, they stay on the current tab.  Anybody any idea how I can do this?  I've been trying to get this all day, but with no luck.  Should I even be using Bootstrap tabs or would it be easier to build my own tabs functionality instead of over-riding bootstrap's tabs?</p>