vishalok12 / jquery-dragarrange

A Basic jQuery library to arrange/order DOM elements by dragging http://vishalok12.github.io/jquery-dragarrange/
MIT License
40 stars 18 forks source link

Get values #1

Open iLenTheme opened 9 years ago

iLenTheme commented 9 years ago

Hi, I like your plugin. Has a functionality which is refreshed values at each change or movement of the elements, eg

1,2,3,4 2,3,4,1

Go changing according to the position.

zzgab commented 7 years ago

Yeah, +1 ! Nice lib, but it should fire a few events to consumer.

vicky1404 commented 7 years ago

How can I call a function once drag ends?

vishalok12 commented 7 years ago

@vicky1404 An event is fired in it's parent element after drag ends. By default event is 'drag.end.arrangeable' but you can pass event name in options { dragEndEvent: 'my-event' }

vicky1404 commented 7 years ago

@vishalok12 Thanks. It's working

jQuery('.draggable-element').arrangeable( { dragSelector: '.drag-area-pg', dragEndEvent:"my_drag_end_event" } ); jQuery( "#uploaded_images_sec" ).on( "my_drag_end_event", function() { myFun(); });

vishalok12 commented 7 years ago

👍