i have the following, which is supposed to write the value of 6 at the cookie NotStarted if the Checkbox NotStarted is checked and the value -1 if the Checkbox is unchecked
$("#NotStarted").change(function ()
{ $.cookie("NotStarted", if($("#NotStarted").is(':checked') == "true") {6} else {-1} , { expires: 20 * 365 }); return false; });
Well it is supposed to do so, since i have syntax errors... What i am doing wrong here?