More Javascript Fun
So, I’ve seen a variety of web pages with components which can be freely dragged around the page. Things like when Facebook used to let you freely drag and rearrange some of your profile boxes. Last night I somewhat randomly decided to find an easy way to do this component dragging using Javascript. Sure enough, I immediately came across a very simple Jquery plugin called EasyDrag. After finding it, I suddenly decided I wanted to make something using it. All I wanted to do tonight was create something simple enough that I could finish at least a very basic example in one quick sitting. So I decided to create a trivially simple puzzle. The puzzle itself is pretty self explanatory. There are 4 colored triangles which start on the left side of the screen. The goal is to drag them onto their matching grey triangle in the middle of the screen. Once a triangle is correctly placed, it cannot be moved any more until the page is refreshed. Yes, this is about on par with puzzles for your average 1 year-old. Oh well, I’ll create something more interesting once I get a bit more time.
The puzzle itself can be found here. My javascript code can be found here.
Leave a Comment
You must be logged in to post a comment.