This example sets a cookie whenever the you click the tab, so if you leave the page and return the same tab remains selected. For purposes of example, this page displays an alert to indicate when a cookie is set or retrieved.
Tab 1 content.
Tab 2 content.
Tab 3 content.