If I understood you correctly I would simply create a session that stores the click. You can accomplish this quickly and easily using ajax to register when the click was made and remotely set a session. This session will be replaced every time the user clicks a tab. This will continuously maintain a session of the last tab clicked. Here is the structure of the three elements needed:
1. The tabs section you have placed in this question (HTML)
2. Ajax post sending the tab selected to remote file for session storage (JS)
3. The remote file that will receive the tab value to store in session (PHP)
AJAX POST
This snippet will listen for the user to click the tab then send the value selected to php file for saving. You can place this into a separate file or directly in the footer of your page. Make sure to have jquery working on your page.
$(".icon-cross").on("click",function(){
var tabValue = $(this).attr('href');
$.post('file-to-save-session.php', {tabSel: tabValue}, function(data){
console.log(data);
});
});
Quick explanation... we listen for the tab with class (icon-cross) to be click, we then store the value of the href attribute into var tabValue. Then we post the value via ajax to the php file for saving. Once it is saved it will echo the retrieved value and the function will display it in the console for viewing and debugging.
PHP FILE - SAVE TAB SELECTION This file can be stored anywhere in your file system, just make sure to point the path correctly in the ajax request.
<?php
session_start();
if(isset($_POST['tabSel']) && $_POST['tabSel'] != ''){
$_SESSION['selected_tab'] = $_POST['tabSel'];
echo $_SESSION['selected_tab'];
}else{
echo 'NO TAB SELECTION RECEIVED!';
}
?>
This is pretty self explanatory. It is listening for a post to the page with the variable sent via ajax post. If the post is sent and the post is not empty it will store the value to the session. If not it will return nothing and not touch the session itself.
YOUR HTML FILE WITH TABS Last but not least you can now add this code snippet to the top of your page to see the value of the last selected tab by the user.
This would go on the page where your tabs are. You may need to convert html file into php if it is not already
<?php
session_start();
if(isset($_SESSION['selected_tab'])){
echo $_SESSION['selected_tab'];
}
?>
Now you will be able to see the previously selected tab on your page. You can store it into a php variable or simply place the session into an if statement to highlight or display the last selected tab.
Hope this helps! Let me know if you need anymore help on the matter :).
UPDATE: OVERRIDE THE JAVASCRIPT BEING ADDED BY PLUGIN:
Add this to the bottom of your page (under all js files)
<?php if(isset($_SESSION['selected_tab'])){ ?>
<script>
$(".icon-cross").removeClass('tab-current');
$("section").removeClass('content-current');
$('[href="<?php echo $_SESSION['selected_tab']; ?>"]').addClass('tab-current');
$('section<?php echo $_SESSION['selected_tab']; ?>').addClass('content-current');
</script>
<?php } ?>
The first two lines will remove the current class from all selected tabs and their headers, the second will add the class to the tab saved in the session. If there is no session, this code will not run.