jQuery选项卡回发问题 [英] jquery tabs postback problem

查看:77
本文介绍了jQuery选项卡回发问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用jquery库.jquery选项卡存在严重问题.解决方案是,当我在第三个选项卡中时,我发回表单,重新加载了选项卡并转到第一个选项卡. 我正在寻找解决问题的方法.

i am using jquery library in my project.I have terrible problem with jquery tabs.Solutions is that when i was in third tab,i post back my form,tabs reloaded and goes to first tab. i am searching to solve problem long time.

<script type="text/javascript">
    $(document).ready(function() {
        $("#example > ul").tabs({ remote: true, cache: true });
    });       
</script>

那么我该如何解决这个问题? 谢谢你的答案.

so how i solve this problem? thx your answers.

推荐答案

标签可以使用cookie存储当前标签.查看标签文档.在选项"列表中,有一个有关如何使用cookie来存储当前选项卡的示例:

tabs can use cookies to store the current tab. Have a look at the tabs documentation. Down in the Options list there is an example of how to use cookies to store the current tab:

$('.selector').tabs({ cookie: { expires: 30 } });

这需要包含 jquery cookie插件.

这篇关于jQuery选项卡回发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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