I am trying to change the value inside localstorage. This item is the status of the checkbox. I want every time a checkbox is set to set the flag to true or false. I tried many ways until I realized that you cannot change the value without using JSON.
To add the value I'm using:
localStorage.setItem("status-" + i, $status.is(":checked"));
and for uninstall I use:
var parentId = $this.parent().attr('id'); localStorage.removeItem("'" + parentId + "'");
Now, to change the value I tried:
$itemList.delegate("#status-" + i, 'click', function(e) { var $this = $(this); var parentId = this.parent().attr('id'); if ($this.is(":checked")) { localStorage.setItem("'" + parentId + "'".val("fdgsdagf"));
Here's what my local storage looks like:
Hope someone can help me. I worked on it for several days ...
thanks a lot
source share