glepiza
asked on
jquery cookies
Hello Experts,
I would really appreciate if someone can please help me to solve the following issue.
I am creating a on/off button using jquery. When the user clicks ON, the page should refresh and set the cookie and the cookie should stay there until the user closes the browser windows. I am using jquery.cookies.js library.
Can someone please guide me on this? I've been checking a bunch of tutorials and so far my script only sets the cookie (when I refresh the page manually), but I don't see it getting deleted and the page does not refresh automatically. Someone told me to use https request, and well... no idea how to do that....
Any kind of guidance would be greatly appreciate it
Thanks in advance,
winter
PS: this is my script:
var active = 'active';
$('#offState a').live('click', function (e) {
e.preventDefault();
$.cookie(active, "activemodal", { expires: 7 });
});
$('#onState a').live('click', function (e) {
e.preventDefault();
$.cookie(active, null);
});
I would really appreciate if someone can please help me to solve the following issue.
I am creating a on/off button using jquery. When the user clicks ON, the page should refresh and set the cookie and the cookie should stay there until the user closes the browser windows. I am using jquery.cookies.js library.
Can someone please guide me on this? I've been checking a bunch of tutorials and so far my script only sets the cookie (when I refresh the page manually), but I don't see it getting deleted and the page does not refresh automatically. Someone told me to use https request, and well... no idea how to do that....
Any kind of guidance would be greatly appreciate it
Thanks in advance,
winter
PS: this is my script:
var active = 'active';
$('#offState a').live('click', function (e) {
e.preventDefault();
$.cookie(active, "activemodal", { expires: 7 });
});
$('#onState a').live('click', function (e) {
e.preventDefault();
$.cookie(active, null);
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER