I have a login form for which I would like to store the username (input field: username) in a cookie via Jquery the moment I click a checkbox ('remmber me'). Does anyone know how to do this?
This guide shows how to use the Cookie plugin for jQuery: http://www.electrictoolbox.com/jquery-cookies/
Then you can use something like this in your javascript files:
$(function() {
$(".rememberme").change(function() {
if ($(this).is(":checked"))
$.cookie("loggin", $("#username").val(), {expires: 7});
}
});