diff --git a/templates/index.html b/templates/index.html index 2c624d0..24558b7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -23,13 +23,13 @@ @@ -58,7 +58,7 @@ Key
- +
@@ -593,12 +593,17 @@ var input = $(this); var key = input.attr('id'); var value = input.val(); + if (input.attr('type') == "checkbox") { + value = input.is(":checked"); + } localStorage.setItem(key, value); }).each(function () { var input = $(this); var key = input.attr('id'); var value = localStorage.getItem(key); - if (value) { + if (input.attr('type') == "checkbox") { + input.prop('checked', value == "true"); + } else if (value) { input.val(value); } });