Jquery UI Tab not loading on programmatic select with Jquery
Right now I've written a script that after clicking the submit button unhides the next tab and selects it. Here's the code:
var $tabs = $('#tabs').tabs();
$('#submitbutton').click(function () {
if ($('#quotesubmit').valid()) {
var resultDiv = $('#ratesView');
$.ajax({
type: "POST",
url: "Rates/Rates",
data: {},
success: function (response) {
resultDiv.html('');
resultDiv.html(response);
}
});
unhidetab();
$tabs.tabs('select', 2);
return false;
}
});
The script works and the tab is unhidden and then selected. The problem is that the tab isn'开发者_如何学运维t actually loaded. Instead I then have to click on the previous tab and then click back onto the new tab. I've also tried using a $tabs.tabs('load', 2); after the tabs select statement to no avail. Anyone familiar with what might be causing this behavior? Thanks.
try this.. I was having the same issue.
$tabs.tabs('option', 'selected', 2);
精彩评论