So Im using the jquery cookie plugin and I need to check if a cookie is unset. I set it up something like this:
if ($.cookie('language')==null) {
}
This doesn’t seem to work. Any ideas why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Line #90 in the source looks like that SHOULD be the result you want. Check for any errors and test what happens if the cookie is set.
https://github.com/carhartl/jquery-cookie/blob/master/jquery.cookie.js