Posted By

1man on 10/29/07


Tagged

javascript resize drag mootools


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

philokezzar


Mootools Draggable / Resize Example


 / Published in: JavaScript
 

Very simple drag and resize function.

  1. function resizeDrag(){
  2. //create an array of elements with class 'drag'
  3. var draggables = $ES('.drag');
  4. //For each of the above elements run this function(pass in the selected function el)
  5. draggables.each(function(el){
  6. //Make the element dragable. Draging starts on the element with class = handle
  7. el.makeDraggable({handle: el.getElementsBySelector('.handle')[0]});
  8. //Make the element resizable. Resizing starts on the element with class = resize
  9. el.makeResizable({handle: el.getElementsBySelector('.resize')[0]});
  10. });
  11. }

Report this snippet  

You need to login to post a comment.