Prasad Jadhav
Prasad Jadhav

Reputation: 5208

Jquery Tabs with Cookies

I am using Jquery tabs using Cookies provided by Jquery and is working perfect as When I refresh the page the selected tab remains the same.
I used following code:

 $("#tabs").tabs({
            cookie: {                   
                expires: 1
            }
        });

But when I navigate to other page and come back the selected tab remains the same. At this point I want the first tab to be get selected and not the one that I have previously selected before navigating to other page.
Will it be possible to use cookies only for refreshing the page and not after navigating to other page? If yes, how?

Upvotes: 1

Views: 210

Answers (1)

mohanrajt
mohanrajt

Reputation: 152

For this you can create the tabs with cookie and when you navigate to other pages you need to manually delete the cookie. For erasing pass the current time stamp to document.cookie. Go through the following link for the detail explaination.

Upvotes: 1

Related Questions