web analytics

Posts Tagged: jquery

jQuery drag’n’drop events chronology

When I was writing (learning jQuery) Solitaire game, I faced lack of documentation on drag-n-drop event's order. So I made simple JavaScript code to investigate this: [crayon-5c17a108c6330665492331/] Working demo on JSFiddle - https://jsfiddle.net/y5ykm415/4/ So, quick summary of events order: Draggable element on mouse click (mousedown) executes drag start event and actual dragging begins All droppable elements activate an wait for droppables. Draggable's drag event executes again and again on each, smallest mouse movement. When draggable reaches droppable and meets tolerance and accept conditions, it(draggable) can be dropped on ... Read more