I need Next, Previous functionality for the jquery tabs on clicking on the Next and Prev html buttons. I am using jquery.1.9.1.js and jquery-ui-1.10.2.custom.
This works for me:
$( "#ui-tabs" ).tabs();
function GetSelectedTabIndex() {
return $('#ui-tabs').tabs('option', 'selected');
}
function ShowTabs(stepNum) {
var num = parseInt(stepNum);
$('#ui-tabs').tabs('option', 'active', parseInt(GetSelectedTabIndex()) + num);
}
It seems to me that there's no point in using the $tabs variable, as it's local to your GetSelectedTabIndex function, and it's only used once per function call...
Demo: http://jsfiddle.net/darkajax/A8ejN/