问题
I have problem after upgrading jquery and jquery ui with new version. I am getting data("draggable") undefined inside droppable.
Fiddle shows my problem.
$(this).data("draggable").originalPosition = {
top: 0,
left: 0
}
It works with jQuery 1.8.3 and jQuery UI 1.9.2. But not working when I use jQuery 2.0.2 and jQuery UI 1.10.3.
You can check using firebug at line number 39 which shows undefined when you are using latest jQuery files.
Please help me or give any alternatives. Thanks in advance.
回答1:
I think it got renamed, try
$(this).data('ui-draggable')
来源:https://stackoverflow.com/questions/18850289/datadraggable-is-undefined-in-jquery-ui-1-10-3