Checkbox status values are stored in localStorage. 'updateStorage' sets these key value pairs to 'null' in localStorage.
The effect is seen only after page reload. How can I achieve the change of the checkbox status to be displayed directly, such as in toggle, after the function is invoked ?
d3.select("#update").on("click",updateStorage);
function updateStorage(){
var updatethis = d3.selectAll(".box").each(function(){
var use_it = this.id;
localStorage.setItem(use_it,null);
d3.select(this).property('checked', null); //does not change display directly
});
};
Adding this line did not help
d3.select(this).property('checked', null);
Do I need a transition ??
Aucun commentaire:
Enregistrer un commentaire