I couldn't get the cookie option to work so I just wrote my own cookie
selector. It seems to be working fine so far but your mileage may
vary. Here is the code if anyone is curious:
var productTabs = $("#tabs");
var cookieTab = $.cookie('product-tabs');
var activeTab = 0;
if (cookieTab !== null) {
activeTab = cookieTab;
}
productTabs.tabs({
selected: activeTab,
show: function(event, ui) {
var cookieTab = productTabs.tabs('option',
'selected');
$.cookie("product-tabs", cookieTab, {
path: "/"
})
}
});
On Oct 15, 11:02 am, nickelstar <[email protected]> wrote:
> I'm using the tabs widget with the cookie option set as follows:
>
> $("#tabs").tabs({
> cookie: {
> expires: 1,
> name: 'product-tabs'}
> });
>
> The problem I'm having is that when I navigate away from the page, the
> cookie is getting deleted. However, if I just refresh the page, the
> cookie is kept and the proper tab is selected based on the cookie's
> value. Any ideas on why the cookie gets deleted when I navigate to
> another page on my website? This happens across all my browsers so it
> doesn't appear to be a browser setting.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---