How to get a form's ID for the selected jquery ui tab?
Posted on 2015-01-27
I have a jquery ui tab instance with several tabs. Each tab has a form with unique ID.
The following determines which jquery ui tab is selected:
var active = $("#tabs").tabs("option","active");
If a user clicks from tab 1 to tab 2, I need to be able to get the ID of the form on the selected tab.
The following attempts to get the <form> ID but only grabs the ID belonging to the first form on the first tab.
var form_id = $("form").attr('id');
If the user selects the second tab, I need to be able to identify the form's ID on this tab?
Thanks for the help!