I am using the tabs of jQuery UI
How do I switch to another tab from current tab in the application pro-grammatically using javascript and jquery on an event eg click of button.
I am using the tabs of jQuery UI
How do I switch to another tab from current tab in the application pro-grammatically using javascript and jquery on an event eg click of button.
Due to security concerns it is not possible. If by "tab" you mean a window and a popup window that opened up in a new tab.
window.opener.focus();
If you want to change to another tab in a Jquery UI tab by programmatically trigger the click event.
$('#id_of_tab').click();
The jQuery UI Tabs use normal links to change the tabs. So easiest way to change tab is just clicking the link (with javascript/jquery). Say the link in your tab has an id like this:
<div id="tabs">
<ul>
<li><a href="#tabs-1" id="tab-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2" id="tab-2">Proin dolor</a></li>
<li><a href="#tabs-3" id="tab-3">Aenean lacinia</a></li>
</ul>
If you want to change to tab 2 you can use $('#tab-2').click();