To Do List Tutorial
For my tutorial I created 2 list objects. These objects generate list items from user input. Cookies are used to save the user data for the 2 lists. You can access my lists here.
My framework that I made describes the properties that compose the list objects. It sets their default values, and also allows the user of my framework to customize certain aspects of the lists, such as colors, and widths. Below you can see the parameters, and their default values as described in the framework.
My framework also provides users with the ability to add items to the list of their choice. They simply need to call the method below on a designated list object, and make sure that a title for the task is provided in the textbox for that list. This function also supplies a feature where if a user were to click on a generated list item, it would change its background color and put a line through the item.
The way the user calls the add method in the framework is displayed below:
Another thing that can be done with this framework is removal of list items. The method shown below creates a span that is applied to every list item that, when clicked, removes the chosen item from the list.
In order to delete a cookie, you need to call a method that creates a cookie of the same name that has expired. This is shown below:
Then make a method to be called by a button that passes the cookie name to the delete method, also make sure that you reset your variables associated with the list.