the compact javascript framework
in partnership with mediatemple
Contains Drag.Base, Element.makeResizable
MIT-style license.
Drag. Base.js | Contains Drag.Base, Element.makeResizable |
Drag.Base | Modify two css properties of an element based on the position of the mouse. |
Element | Custom class to allow all of its methods to be used with any DOM element via the dollar function $. |
Properties | |
makeResizable | Makes an element resizable (by dragging) with the supplied options. |
Modify two css properties of an element based on the position of the mouse.
Drag.Base requires an XHTML doctype.
el | the $(element) to apply the transformations to. |
options | optional. The options object. |
handle | the $(element) to act as the handle for the draggable element. defaults to the $(element) itself. |
modifiers | an object. see Modifiers Below. |
limit | an object, see Limit below. |
grid | optional, distance in px for snap-to-grid dragging |
snap | optional, the distance you have to drag before the element starts to respond to the drag. defaults to false |
x | string, the style you want to modify when the mouse moves in an horizontal direction. defaults to ‘left’ |
y | string, the style you want to modify when the mouse moves in a vertical direction. defaults to ‘top’ |
x | array with start and end limit relative to modifiers.x |
y | array with start and end limit relative to modifiers.y |
onStart | optional, function to execute when the user starts to drag (on mousedown); |
onComplete | optional, function to execute when the user completes the drag. |
onDrag | optional, function to execute at every step of the drag |
Custom class to allow all of its methods to be used with any DOM element via the dollar function $.
Properties | |
makeResizable | Makes an element resizable (by dragging) with the supplied options. |
Makes an element resizable (by dragging) with the supplied options.
options | see Drag.Base for acceptable options. |
returns the element passed in with all the Element prototypes applied.
Documentation by Aaron Newton & Mootools Developers, generated by NaturalDocs and GeSHi