Up until now, we've worked with Local Storage directly in our code. While this will work perfectly well, it's not an ideal solution; it improves messy code if it is held inline, and adds a lot of unnecessary code to a site. A better option is to separate the code and turn it into a plugin that we can re-use; we will see how we can build a simple plugin as part of this recipe.
For this recipe, all you will need is your text editor. Anything else that is required is called directly from within the code.
Perform the following steps, to build a simple plugin using jQuery: