I cannot get this code to work I must be missing something pretty simple. I am trying to check to see if a Cookie exists, if it does {do nothing} if it doesn\'t {create it}
You can set the cookie after having checked if it exists with a value.
$(document).ready(function(){
if ($.cookie('cookie')) { //if cookie isset
//do stuff here like hide a popup when cookie isset
//document.getElementById("hideElement").style.display = "none";
}else{
var CookieSet = $.cookie('cookie', 'value'); //set cookie
}
});