I am using ASP.NET page with updatepanels and Jquery UI tabs. However, I'm having a problem with it. When I click on a button it should set the value of a hidden field which when the page posts back, it will select the new tab.
So in document onload set the tab to the initialised value of the hidden field:
$(function()
{
var loadTab = $("#<%= hidTabSelected.ClientID %>").val();
$('#dvJqTabs').tabs(
{ selected: loadTab ,
select: saveTab
}
)
});
Now when I want to change the tab, in the ASP.NET page button click handler I do some processing and finally set hidTabSelected = 1 (previously 0). When the page posts because I am in UpdatePanels I won't get a doc ready event. So instead I intercept the pageLoad() and attempt to set the tab again:
function pageLoad()
{
alert('pageLoad()');
var loadTab = $("#<%= hidTabSelected.ClientID %>").val();
$('#dvJqTabs').tabs( { selected: loadTab } );
}
The tab is not getting selected? If I go into console of firebug and inspect $("#hidTabSelected").val() I get 1. So why isn't the 2nd tab showing?