Jquery Tabs and cookies
Jquery Tabs and cookies
Hi
I am very new to jquery and need some help.
I have set up tabs on a page, however the page contains multiple forms, each within its own tab. So the problem i have is that when the form within the tab is submitted my code reloads the page and obviously goes back to the default tab 1 fragment-1. What i want it to do is go back to the tab that submitted the form i.e. tab2 fragment-2.
So from looking around i think i need to set a jquery cookie to remember the last tab selected. However as i said my javascript is almost non-existent so i need some help.
My Javascript for the pag elooks like this
-
$(function() {
$('#container-1').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'fast'});
});
I have the jquery cookie set in my header. But have no idea how to bind the events and set and delete the cookie.
I would appreciate any help anybody could give me. Thanks