This is probably more simple than I'm making it but I just can't figure out how to do it. What I've got are tabbed sections created in Coldfusion. The output is that the selected section has a class name that contains the string "tab_selected (+ the UUID created in coldfusion)" versus the unselected tab sections whose class names contain the string "tab_unselected (+ the UUID created in coldfusion)". When you click on the unselected tabs the class is changed to "tab_selected (+ the UUID)" and all the other tabs are set accordingly.
What I'm attempting to do is, using javascript, when you exit the page it searches for the element that has the class that contains the string "tab_selected" and then sets the cookie with the id of that element...
This is all I have at this point (in JQuery)...And it could be terribly wrong. Please help.
$(window).unload( function () {
$("selector[name*='tab_selected_text']").cookie("TABS_REMEMBER", 1, { expires: null });
});