Return to Snippet

Revision: 4151
at October 29, 2007 08:29 by 1man


Initial Code
function resizeDrag(){
	//create an array of elements with class 'drag'
	var draggables = $ES('.drag');
	//For each of the above elements run this function(pass in the selected function el)
	draggables.each(function(el){
		//Make the element dragable. Draging starts on the element with class = handle
		el.makeDraggable({handle: el.getElementsBySelector('.handle')[0]});
		//Make the element resizable. Resizing starts on the element with class = resize
		el.makeResizable({handle: el.getElementsBySelector('.resize')[0]});
	});
}

Initial URL


Initial Description
Very simple drag and resize function.

Initial Title
Mootools Draggable / Resize Example

Initial Tags
javascript, resize

Initial Language
JavaScript