views:

47

answers:

2

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" style="float:left; width:895px; margin-top:20px;">
+2  A: 

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

SLaks
+1  A: 

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

By default it will always show this tab even with cookies