与饼干jQuery的标签 [英] Jquery Tabs with Cookies

查看:106
本文介绍了与饼干jQuery的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的使用由 jQuery的提供饼干jQuery的标签和当工作完美的我刷新页面选择的选项卡是相同的。结果,
我用下面的code:

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
            }
        });

但是,当我浏览到其他页面,回来选定的选项卡是相同的。在这一点上,我希望第一个选项卡中选择得到,而不是一个我不得不导航到其他页面之前pviously选择$ P $。结果
这将有可能使用cookies只为刷新页面,而不是导航到其他页面后?如果是的话,怎么样?

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?

推荐答案

有关这一点,你可以创建的cookie的选项卡,当你浏览到其他页面,你需要手动删除cookie。擦除传递当前的时间标志的document.cookie。通过以下链接
对于详细的解释。

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.

这篇关于与饼干jQuery的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆