Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqDnR plugin doesn't work with jQuery 1.4

I am using jqModal plugin which relies on jqDnR for drag and resize support. After I upgraded jQuery to 1.4, modal boxes stopped responding to "drag" event. Does anyone know why this is happening?

Thanks..

like image 334
arkadiy kraportov Avatar asked Jan 21 '10 09:01

arkadiy kraportov


3 Answers

Using the version downloaded directly from the author's website (here), on lines

19, character 38

and

27, character 23.

Replace

$()

with

$(document)

That's how I got jqDnR to work with 1.4

like image 101
irms Avatar answered Oct 27 '22 03:10

irms


see the jQuery 1.4 release announcement - Backwards-Incompatible Changes.

We’ve also written a plugin that provides backwards compatibility with every potentially-breaking change that we’ve made in 1.4. Feel free to download and include this plugin, after you’ve included 1.4, if you have any issues upgrading to 1.4.

How to use the plugin:

<script src="http://code.jquery.com/jquery.js"></script>
<script src="http://code.jquery.com/jquery.compat-1.3.js"></script>

include it, or wait for new, 1.4 compatible version of plugin you're using.

like image 2
parserr Avatar answered Oct 27 '22 04:10

parserr


I was using the jqDnR, jqModal and jQuery for several months and had issues with dragging failing in Safari/Chrome or getting stuck in Firefox. I recommend switching to JQuery UI Draggable...

http://jqueryui.com/demos/draggable/

I think many of the features that were originally in jqDnR/jqModal have been moved to ui-draggable. The switch wasn't too tough. The only drawback (which is also in jqDnR) is when using an iframe in the draggable container. If the mouse moves too fast into the area of the iframe from the drag handle (or draggable area containing the iframe), the iframe appears to pick up the mouse action and the drag gets hung until you re-enter the draggable area. A bit of a hack is required for that...

Trouble Using JQuery UI.Resizable() and UI.Draggable() with an iFrame

After putting the hack above, performance is better.

like image 1
weezy Avatar answered Oct 27 '22 04:10

weezy