I want to set a cookie when a person clicks on a link, then i want to get that cookie and have it somehow add the class 'pinned' to '#navigation'. I'm not too sure if this is right, i'm using the jquery cookie plugin, ugh. this is the code I have so far:
to set the cookie:
$.cookie('CookieName':'#navigation');
gets the cookie, adds the class 'pinned' onto the element #navigation
$("#" + $.cookie('cookieName')).addClass("pinned");
But whenever i put this code anywhere in my JS file, it causes all of the JS not to work anymore, so it breaks my whole page.