2

I'm using the JQuery UI Draggable Collision plugin. When I change the jQuery UI from 1.9.2 (in the plugin examples folder) to the latest 1.11.2, the dragging stops working.

The same symptom can be seen here jsfiddle.net/MrAdE/11/ if you change the jQuery version to 2.0.2 so you can select jQuery UI 1.10.3.

My browser console shows errors in the jquery-ui-draggable-collision.js file, everytime the .data() function is used:

  • TypeError: $(...).data(...) is undefined

Can anybody help me overcoming this? I'd like to use the plugin but I don't want to get stuck in the jQuery ui 1.9.2 because of it.

Many thanks

ca2s7l
  • 273
  • 1
  • 5
  • 12
  • 2
    Replacing .data("draggable") with .data("ui-draggable") fixes the problem, but now the margins don't seem to work right. I can't get a draggable element to touch the bottom and right margins and I'm able to go beyond the top margin. [Print screen here](https://db.tt/q8zWEspn) and [Sample project here](https://db.tt/t9fHAWDl) Can someone help? – ca2s7l Nov 27 '14 at 09:59
  • @ca2s7I: same problem here, did you manage to fix it? – Paolo Mar 09 '15 at 15:13
  • Hi Paulo. No, I didn't spend much time around it, skipped to gridstack which is better and very flexible. In the end developed my own plugin to suit my needs. – ca2s7l Mar 09 '15 at 15:54
  • That's cool! Is your plugin for public consumption? If yes, may I see it? :) – Paolo Mar 10 '15 at 08:30
  • Hi, sorry but I can't disclose the plugin. It's just a jquery ui draggable/resizable with some specific functionality. Have a look at those and gridstack/gridster. – ca2s7l Mar 10 '15 at 10:52

0 Answers0