Is there a way to read for the cookie “signupnewsletter” and have the another Colorbox popup if it finds “signupnewsletter” and place a second cookie “important message”?
How would I use that code for a Colorbox to pop up showing say our “Contact Us” Page and the popup leave a cookie named “contactinfo”? But after ‘signupnewsletter’ cookie has been place from maybe another visit.
If the cookie is named “signupnewsletter”, it wouldn’t contain the substring “what=true”. The “what” is the name of another cookie.
Also, the construct if ($.cookie(‘signupnewsletter’)) seems dubious to me. $ always returns a jQuery object, so the test will always be true even if the cookie doesn’t exist.
Your main trouble here is that you’re mixing jQuery and JavaScript in inappropriate ways. It’s better to stick to one methodology or the other when working with a cookie or any other object.