• Notice regarding image hosts and attachments. See here.

jquery .cookie plugin help

Soldato
Joined
12 May 2007
Posts
3,895
Location
Bristol
Anyone have experience with the jquery cookie plugin?
I've created a simple theme switcher but need to set a cookie to remember which theme should be used on the other pages.

Code:
	$("ul#themes li:first-child a").addClass('active');
	$("ul#themes li a").click(function(){
		$("ul#themes li a").removeClass('active');
		$(this).addClass('active');
		var theme = $(this).attr("id");
		$("link#themeswitch").attr("href", "media/css/" + theme + ".css");
		return false;
	});

This is the line which sets the CSS.
$("link#themeswitch").attr("href", "media/css/" + theme + ".css");

So how would I set a cookie to recall whatever my theme variable is and then apply it?
 
Back
Top Bottom