jQuery Cookie Help
Posted
by Bruno
on Stack Overflow
See other posts from Stack Overflow
or by Bruno
Published on 2010-04-22T18:57:36Z
Indexed on
2010/04/22
19:03 UTC
Read the original article
Hit count: 303
Hi there..
So I have never attempted to use a cookie and was wondering if someone could possibly help me with some functionality I am trying to achieve..
Essentially I have a jQuery function that is fired when a user visits a webpage. What I would like to do is make it to where that animation only plays once.. Possibly leveraging some cookie that would tell it not to play again for x amount of days.
I noticed that alot of people having questions about cookies and jQuery have been mentioned the following cookie plugin, but I dont even really know how to leverage it.
Any ideas?
Right now the animation is:
$('#header, #footer, #secondary-column').fadeTo(600, 1);
I would assume that if I could set a cookie to tell it the following:
$('#header, #footer, #secondary-column').fadeTo(0, 1);
© Stack Overflow or respective owner