jQuery & Cookies – How to get/set/delete cookies in jQuery

To get/set/delete cookies in jQuery, for this you can use jQuery Cookie plugin

Here is how to use jQuery Cookie plugin in your code:

// Setting a cookie

// Creating cookie with all availabl options
$.cookie('myCookie1', 'myValue1', { expires: 7, path: '/', 
domain: 'avinash6784.wordpress.com', secure: true });

// Get a cookie

// Delete a cookie
$.cookie('myCookie', null);