Tabs loaded via ajax do not stay in selected tab.
I have a set of tabs that are loaded via ajax as shown in the demo.
One of the tabs is a form that on succesfull submit should reload the entire page.
However I fail to see how to get back into my selected tab:
- $jq.post("submitModules.php",{ module: obj.name,value: obj.value} ,function(data)
{
if(data=='1') //if submit is succes
{
window.location.reload(true); //line 1
$jq("#tabs").tabs('select', 1); //line 2
} else if(data=='0') {
$jq("#validateTips")
.attr('class', 'ui-state-error')
.html('<strong>ERROR</strong>:Something went wrong.<br />');
}
});
Either line 1 or line 2 works but not together.
How can I achieve to reload the entire page AND jump into the second tab?
Regards, Karel