Twitter Stream
Interesting News Items
Powered by Squarespace
« Round Boxes | Main | Search Commands »
Friday
May222009

Make Movable

Have you ever wanted to make your html elements move around? Well this function will make that happen for you.  All you need to do is call "makeMovable([your html element goes here]);".  This type of function can be used for UI constructs like popup windows and error dialogs, or just for impressing people with your mad skillz (jk!).

makeMovable.js
makeMovable.js

You can also specify a "Handle" for your object (in my experience this is the most common usage). When you specify a handle, your target object will only move when the handle is being dragged. Just use the following code: "makeMovable([your target element goes here],[your handle element goes here]);" It is recommended that the "Handle" element is a child of the "Target" element.

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (1)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>