[jQuery] OnMouseDown = create draggable, OnMouseUp = create droppable
Hello, I am creating a website that must have hundred's of drag- and droppables so, I want to enable a Draggable on the mouseDown event (partially working) and a Dropable on the mouseUp event or something. So that they dont have to be created at once. Question 1): As my title suggest, I want a draggable on the OnMouseDown event. This is already working: function createDrag(id){ $("#"+id).draggable(); } Drag me But when I click the dragable, it is not following the cursor. 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? Question 2): How to let the droppable being created on the OnMouseUp event? I have trying code like this: $("#droppable").droppable({ drop: function(ev, ui) { console.dir(ui) } // nm. I use this to get the items in firebug }); Drop here 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
[jQuery] OnMouseDown = create draggable, OnMouseUp = create droppable
Hello, I thought I had already create a new topic, but I dont see it at the discussion group. The issue is as follows, I am building a site that contains hundred's of dragg- and droppables. So I decide, that the draggable must be created on the OnMouseDown (already partially working), and the droppable on the OnMouseDown event. Question 1: I have this code for the draggable: function createDrag(id){ $("#"+id).draggable(); } Drag me This is working, but only when I click twice. At the first mouseDown the draggable is created, but does not follow my cursor. How to solve this, so that the draggable follows the cursor from the beginning? Question 2: How to fire on the OnMouseUp event - when the draggable is dropped - a function that creates a droppable? It does not work when I use similar code as for the draggable. Any idea's? Thanks in advance
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
Anyone that can read it and point me to the right direction?
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
At this moment, I havent found a solution. Can jQuery not such things. I thought it was realy simple for jQuery. But in the documentation there is not mentioned such a solution. Can anyone say what I have to do to get the right Ajax/Drag n Drop functionality?
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
No one? Is there such a feature in jQuery for this problem? Thanks in advance guys! I have al this days been working on this issue, and hope someone is willing to take a short look to this problem. Thanks
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
Thanks for the answer Karl Rudd, But that is what I already have tried. If you read the start post, then you see that I want to create the drag and dropable on runtime. If there is something what is not clear, please say it. Thanks again if someone is willing to read the start post and then point me in the right direction.
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
Not yet, oops, I think I am in the wrong mailing list. As mentioned in my first line in my startpost, I need indeed hunderds of drag and droppables, the CPU is now running at its full speed when dragging just somewhat around. I want to solve that by creating a draggable and a droppable when needed. Thus: 1) create a draggable on the MouseDown event, and a droppable on the MouseUp event (just when releasing the mouse for dropping) Any idea?
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
BTW, here is the HTML source (build from PHP and MySQL). http://depositfiles.com/files/8qhklz539
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
Also not the solution requested, I should post in the jQuery-UI group. Thanks for the help!
[jQuery] [Ajax request]Can a dialog not show an alert message?
Hi everyone, I have an event that fires up a dialog, this all is working: 1) dialog have two buttons - Save button - Close button 2) when hitting the save button, it creates an Ajax Request, and on the succes event it must fire an alert with the message that comes back from the backend script. 3) in Firebug is the message back shown, but not in the Alert, how to deal with this? Thanks in advance
[jQuery] Re: Can a dialog not show an alert message?
Anyone any comment about this issue? Thanks in advance!
[jQuery] Re: Can a dialog not show an alert message?
The code I have: [code] // Show edit planitem dialog function showEditPlanitemDialog(planid, title, timestamp){ $("#edit_dialog").dialog({ width: 155, buttons: { "Ok": function() { // Save $.ajax( { type: "POST", url: "scripts/save.php", data: "test=test", succes: function(msg){ alert(msg); } }); //console.dir(); }, "Close": function() { $(this).dialog("destroy");} // Close dialog } }); } [/code] You see I want on the "succes" an alert, I dont get it in an alert box, but I see it in the console.dir from Firebug.
[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable
The solution is posted here: http://groups.google.com/group/jquery-ui/browse_thread/thread/bec7dba6705040fc/f52e524f230b93e0?lnk=gst&q=delphilynx#f52e524f230b93e0 On 16 mrt, 07:35, delphilynx wrote: > Also not the solution requested, I should post in the jQuery-UI group. > Thanks for the help!