How to keep the same vertical tab open on AJAX call? We're using vertical tabs on a configuration form for a ctools content type inside Panels. Inside most of these vertical tabs, there are "Add more" buttons, which use AJAX to add another item to the form. Essentially combine these two examples:

https://api.drupal.org/api/examples/vertical_tabs_example!vertical_tabs_example.module/7

https://api.drupal.org/api/examples/ajax_example!ajax_example_graceful_degradation.inc/function/ajax_example_add_more/7

We set the container around the whole form to reload the entire thing. The problem is that, on reload, the vertical tabs reset. We'd prefer it leave the element that the user currently had open open. Is there a way to do that?
We can save in $form_state html id current vertical tab.
Only, be sure, do not forget to set custom ids your tabs