The project was inspired by the 'products chosen' counter on BicWorld.com; I'd been meaning to learn some JQuery for a while and it seemed like a perfect entry level challenge. Fortunatly, a friend of mine was more than happy to supply me with a statistic:
@ProFishChris 18.7 Spelunking sessions per day.— Daniel Scales (@DanielCake) March 2, 2014
Date() objects proved to be fairly straight forward but I count myself lucky for coming across this post on
Date() formats as it added much needed insight into the myriad of formats available.
Handling cookies took the largest amount of time on this project. This was partially down to trying to create flexible and reusable logic and partially down to a small but unforgiving error: cookie values are separated by '; ' not ';' (note the space!). An inordinate amount of time was spent trying to figure out why only the first properties added to
cookieBatch could be queried due to this almost invisible character.
Quick and Easy
Ultimately this was a straight forward project that contained enough new elements to keep me entertained. I found JQuery pleasant to use and it contains a ton of useful functions for simplifying syntax and dealing with browser quirks. It was great to finally put cookies to good use and I'm pleased with having formulated a generic way in which to handle them. Be sure to check the links in the top right if you want to see the source code!