Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery dragstart and dragend events in Jquery UI

Is there somehow a way to access these two events? Do the even exsist? I have to set transfer data on dragStart and dragEnd to an event object.

like image 417
Jacob Avatar asked Mar 11 '13 15:03

Jacob


People also ask

What is jQuery draggable?

jQuery UI draggable() method is used to make any DOM element draggable. Once the element is made draggable, you can move it by clicking on it with the mouse and drag it anywhere within the viewport.

How do I use draggable JS?

By default, only image and text can be draggable. To drag an image, you simply hold the mouse button down and then move it. To drag the text, you need to highlight some text and drag it in the same way as you would drag an image.

Why is draggable not working?

Check whether your draggable object is already loaded in the viewport. If it is not, it won't work properly. JUST AFTER the draggable object to be absolutely sure that everything is loaded at the correct time. When you'll be sure everything is ok, then you'll be able to refactor.


1 Answers

Check:

Drag start: http://api.jqueryui.com/draggable/#event-start

Drag stop: http://api.jqueryui.com/draggable/#event-stop

You are able to access current event in both function calls.

like image 186
iappwebdev Avatar answered Oct 06 '22 02:10

iappwebdev