Save tab-pane active when refreshing the page

0

I have a two-tab structure, and I need to keep the active tab active when I refresh the page. I thought about doing a click function that saves the session's open tab id, but I need to send a request (ajax) from js to Session. You can do it, but I wanted to know if you have a better way to do it.

    
asked by anonymous 12.11.2015 / 19:11

1 answer

0

When I need something of this type I use this library jquery-cookie

The syntax is quite simple:

Create:

$.cookie('name', 'value', { expires: 7, path: '/' });

Read:

$.cookie('name');

Delete:

$.removeCookie('name');

I hope it helps, hug.

    
12.11.2015 / 22:07