Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I download the jquery cookie plugin? [closed]

I'm trying to implement cookies in my website, I'm using jquery, but I can't find a place to download the plugin itself.

Any ideas?

like image 306
KamalSalem Avatar asked Jan 02 '12 19:01

KamalSalem


People also ask

What is jQuery cookie plugin?

A simple, lightweight jQuery plugin for reading, writing and deleting cookies.

Can jQuery create cookie?

Cookies can be set in the browser with the help of JavaScript or the jQuery.

How check cookie is set or not in jQuery?

If this is the case, then you can actually check if a user has enabled cookies or not using the following straightforward jQuery snippet: $(document). ready(function() { var dt = new Date(); dt. setSeconds(dt.


1 Answers

Description

You can download it on Github and use it like this

Sample

Setting a cookie

$.cookie("example", "foo");

Setting with expiry time

$.cookie("example", "foo", { expires: 7 });

Getting the cookie

$.cookie("example")

Deleting the cookie

$.cookie("example", null);
like image 56
dknaack Avatar answered Oct 14 '22 00:10

dknaack