Based on Henridv's Answer , I ended up with this:
$("#remember_me").change(function() { $.cookie("remember_me", $(this).is(":checked"), {expires: 7, path:'/'} ); });
Please note that my solution also sets the cookie to false if the checkbox is unchecked. In other words, this saves the current cookie.
Bengt source share