Link to home
Start Free TrialLog in
Avatar of ajayvegesna02
ajayvegesna02

asked on

How to set the time in JQuery's cookie persistence Tab

I am using the cookie persistence Tab in my JSP appliation...

http://jqueryui.com/demos/tabs/#cookie....

But how to set the Cookie Time in Mints... By Default it will store 1 day in browser...

Thanks,
Ajay
Avatar of Erdinç Güngör Çorbacı
Erdinç Güngör Çorbacı
Flag of Türkiye image

there is the documentation


Initialize a tabs with the cookie option specified.
$( ".selector" ).tabs({ cookie: { expires: 30 } });
Get or set the cookie option, after init.
//getter
var cookie = $( ".selector" ).tabs( "option", "cookie" );
//setter
$( ".selector" ).tabs( "option", "cookie", { expires: 30 } );
Avatar of ajayvegesna02
ajayvegesna02

ASKER

U have mentioned expires : 30
will 30 stands for Minutes? if so how can we set in seconds

Thanks,
Aj
I want to maintain the selected tab only for 1 or 2 mints, after that the user loads the page again i need to show the first tab;

Thanks,
Aj
ASKER CERTIFIED SOLUTION
Avatar of Erdinç Güngör Çorbacı
Erdinç Güngör Çorbacı
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

IF i put this code.. i lose the tabs functionality...

Any idea??

Thanks,
Aj