vendredi 17 juillet 2015

d3.js .each( ) select a range of key/value pairs in localStorage Self Learner Badge

Here is a post as a Self Learner.

My task:

I have a dictionary with 15.000 entries. The user can select whether the entries are being displayed or not by checking a checkbox related to each dictionary entry.

The checkboxes and entries are displayed in dynamically generated lists, the user choses the length of the lists.

The state of the checkboxes is stored in localStorage with either of the two:

localStorage(key,true);
localStorage(key,null);

and the checkboxes are set to :checked if their related key is paired to "true".

Now I need an update button to reset an entire list to "all checkboxes not selected".

This seemed a difficult task to me, as the length of the list is dynamically set, and, I also feared that my function would affect the entire localStorage.




Aucun commentaire:

Enregistrer un commentaire