Forum Moderators: open
When I created the page as outlined in the thread the javascript doesn't appear to work. When I try to drag the DIVs they don't move. I've tried the script in IE7, FF3, and Chrome. FF3 with Firebug reports the following error.
dragndrop.edrag is null
http://localhost/ajax/test2.asp#
Line 41
I'm not familiar enough with JSON, or Javascript in general, to understand what's going on in with the code. Can anyone enlighten me?
say you have your div, which has a unique ID like this:
<div id="mydiv">Drag me, please!</div>
var dragme = new Drag($('mydiv'));
and you're done. Drag away.
the Drag object has all the options and properties you need to make it draggable, droppable, and trigger events onDrag, onDrop, onEnter, onLeave, etc. you'll save yourself hundreds of hours of debugging. Try it.