Open wflemmer opened 9 years ago
Get the widget element (usually a li
) as jQuery-Element and trigger a mousedown and then perhaps a mousemove event on it; for example $myWidgetLi.trigger({type:'mousedown', which:1, clientX:curMouseX, clientY:curMouseY})
with curMouseX/Y as the appropriate coordinates.
Hi, I am trying to achieve same , i tried the same code but cant able to trigger the mousedown event , is there any other way to trigger the mouse down event ? Please reply if you got the answers . TIA.
I solved a similar (but not identical) problem back on Nov 13. See my answer here. I expect you could use the simulate library to trigger the mousedown.
Hello,
I'm dynamically adding elements to the grid by dragging divs into it. Once the draggable div enters the grid, add_widget is called, and a new widget is added to the grid in the position specified. At this point, the mouse is still clicked, and I need to manually trigger a drag event on the new widget in the grid, so it follows the mouse. Does anyone know how this can be accomplished?
Thank you, Wade