Jquery / Basics / Cookie
Cookie using jquery
-
STEPS
Step1 : plugin
Step 2: set & get cookie
Set cookie
get cookie$.cookie("Name", "manoj"); $.cookie("Name"); Step3 : store multiple values
Parse data from cookievar cartItem=[]; cartItem.push({"pooja_id":1, "price": 100}); $.cookie("cart_item",JSON.stringify(cartItem)); var cartItem=JSON.parse($.cookie("cart_item"));