You are here

Checking if cookie value is equal to ...

Setting up the cookie:

$.cookie("userAgeValue", "userUnder21", { path: '/' });

Checking if value = "userUnder21":

if($.cookie('userAgeValue') == 'userUnder21') {
//do something;
}
code type: