开发者

Jquery Tabs Cookies

I am trying to use the Jquery cookie plugin to remember the last selected tab.

I can't seem to get it to work.Do i need anything else apart from the jquery lib and cookie plugin???

This is the code:

  <script type="text/javascript">
    $(document).ready(function() {
       $("#tabletabscampaigns > ul").tabs({ remote: true, cache: true });
$("#tabletabscampaigns").tabs({selected: 0, cookie: { expires: 30}  }); 
    });       
</script>

<div id="tabletabscampaigns" sty开发者_开发问答le="float:left; width:895px; margin-top:20px;">


Assuming that you're using this Tabs plugin, make sure that you have the correct Cookie plugin.


The problem is that in the options you have: selected:0

By default it will always show this tab even with cookies


in the plugin documention it states not to use selected with cookie plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜