Thursday, March 8, 2012

JavaScript Throwing HTML Elements

Problem:

While working on a programming project that would show my wife how much I loved her on Valentine's Day (yes, I'm that nerdy, no traditional flowers from me), I wanted to build a slideshow with images that my wife could drag and throw photos around and so on. While I looked for something already written that would do the trick but I did a lot without canvas and couldn't change at this point. I never found anything that would allow for that 'throwing' action and ended up not having that functionality available in the program.

Solution:
For kicks, I wrote my own.

Example:
Solo Item
Multiple Items
Photo Items

While it is certainly not perfect and more of a proof of concept more than something used in a production platform, I am hoping it offers something to someone out there. The concept is simple enough.

If you use this code please credit me. Thank you.

No comments: