Hello
U want to save info about which one tab is active ?
I use something like this.
$('#mwtripsTabs').on('show.bs.tab', function(e) {
var name = $(e.target).attr('href');
tabname_length = name.length;
tabname = name.substring(name.indexOf("#")+1, tabname_length);
jQuery.ajax({
method : 'POST',
url: 'index.php?option=com_mwtrips&task=trip.save_tab',
data: { tab_name: tabname }
})
.done(function(data) {
});
});
public function save_tab() {
$app = JFactory::getApplication();
$user = JFactory::getUser();
$response = array();
$jinput = $app->input;
$tabname = $jinput->get('tab_name','', 'STRING');
$app->setUserState('com_mwtrips.tab',$tabname);
$response['wiadomosc'] = "Gotowe";
echo json_encode($response);
$app->close();
}
Sins
Mac