Dragging an HTML element

HTML can be moved around on a page with a click-and-hold while moving the mouse.

Getting ready

MooTools has two libraries: Core and More. The Core contains code that is always used for every MooTools application and is found at http://mootools.net/core. There are many goodies that are oldie or otherwise in the MooTools More library: http://mootools.net/more.

In a previous recipe we profiled the sizes of different MooTools versions. There are different versions of MooTools More; nevertheless, we will be profiling only different selections for download of the 1.3.0 MooTools More library:

mootools_core-more-1.3.0.js 328K

mootools_core-more-1.3.0c.js 224K

mootools_core-more-nolocale-1.3.0.js 217K

mootools_core-more-nolocale-1.3.0c.js ...

Get MooTools 1.3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.