I originally used the following jQuery statement to see if my cookie existed:
if (document.cookie.indexOf(\'cookie-foo\') >= 0) { $("my-div")