How to get cookie value with javascript or jquery

What you did is setting a cookie and not getting a cookie.

try var customerId = $.cookie('CustomerID');

or maybe you are trying to get the cookie from the root path but it’s actually lives at a lower path..

Check out where you save the cookie!

Leave a Comment