Hello,

I am creating a website that must have hundred's of drag- and
droppables, so for performance purposes I want to enable a Draggable
on the mouseDown event
(partially working) and a Droppable on the mouseUp event or
something.
So that they don't have to be created at once.


<b>Question 1): </b>
As my title suggest, I want a draggable on the OnMouseDown event.
This
is already working:
<i>function createDrag(id){
        $("#"+id).draggable();
  }
<div id="draggable" onMouseDown="createDrag('draggable');">Drag me</
div></i>
But when I click the dragable, it is not following the cursor
directly. When I
re-click the dragable, it is following. The question (1) is how to
let
the dragable directly following the cursor at one event, cq the
OnMouseDown event?


<b>Question 2): </b>
How to let the droppable being created on the OnMouseUp event?
I have trying code like this:
<i>
$("#droppable").droppable({
      drop: function(ev, ui) { console.dir(ui) } // nm. I use this to
get the items in firebug
    });
<div id="droppable" onMouseUp="createDrop('droppable');">Drop here</
div></i>
The difficulty about this question is, that the onMouseUp is fired
upon the draggable that is being dragged, I think.

So I hope you understand it, and I hope that someone is willing to
read and answer what I am doing wrong and suggest something in the
right direction.


Thanks in advance

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to