In jquery sortable UI, what can we get from event function parameters like ui and event?

I know that we can get the current moved item idonui.item.attr('id')

but what can we get from the parameter event? Can it look like javascript, has a property event.target?

or get something else?

+3
source share
2 answers

All callbacks receive two arguments: the original browser event and the prepared ui object, the view below (if you call your second argument “ui”), you can do:

ui.helper - ( )
ui.position -
ui.offset -
ui.item -
ui.placeholder - ( )
ui.sender - , ( )

. http://jqueryui.com/demos/sortable/

+1

Firebug Chrome Dev, , .

stop:

enter image description here

originalEvent: a.Event node, target, : target: HTMLTableCellElement

+1

Source: https://habr.com/ru/post/1796742/


All Articles