I have a page made with Bootstrap 3 framework that contains two tabs. I have a button which when clicked opens the second of the two tabs. This works fine but now I want the entire page to reload after the button is clicked and then open the second tab it does not work (the page just reloads and stays on the first tab. Why does this not work?
//This works
$('button').click(function(){
$('a[href="#credits"]').tab('show');
});
//This doesn't work
$('button').click(function(){
//reload entire page
location.reload();
$('a[href="#credits"]').tab('show');
});