jQuery 1.9 and UI 1.10 tabs with cookies

by filip 31. January 2013 15:19

Seems like jQuery UI got rid of maintaining state with the latest implementation.

Before, it pretty simple to keep state across page loads with jQuery tabs. This is one possible way to do it with the new code.  Its still pretty easy, just a little different.

$("#tabs").tabs({ 
    activate: function (e, ui) { 
        $.cookie('selected-tab', ui.newTab.index(), { path: '/' }); 
    }, 
    active: $.cookie('selected-tab')             
});

Tags:

Bloodforge Band

Looking for the Bloodforge band site? Click here.

About Filip Stanek

Death Note Pic I'm a developer at ACG in Cincinnati, OH. I like ASP.NET, Flash, and other web technologies, & enjoy playing chess, video games, etc.

Currently playing:

Disqus

Month List