I am new to jquery and bootstrap,so please consider my mistakes.I have created a bootstrap modal for login and registration. It contains two nav-tabs called as login and reg
Hi Try this one folks!
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
// save current clicked tab in local storage does not work in Stacksnippets
// localStorage.setItem('lastActiveTab', $(this).attr('href'));
});
//get last active tab from local storage
var lastTab = "#profile"; // localStorage.getItem('lastActiveTab');
console.log(lastTab + "tab was last active")
if (lastTab) {
$('[href="' + lastTab + '"]').tab('show');
}
Home
Profile
Message
Settings