Triggering dragging in 1.3.1 & 1.6rc6
In the previous versions of jQuery & jQuey-UI, one could trigger
dragging like so:
jQuery(document).ready(function() {
jQuery("#myDiv").mousedown(function(ev) {
target = jQuery(ev.target);
/* Various logic that sets the draggable variable to either true or
false */
if (draggable) {
target.draggable({
helper: "clone",
stop: function()
{
jQuery(this).draggable("destroy");
}
}).trigger("mousedown.draggable", [ev]);
}
});
});
But it will not work, javascript reports the following error:
"event.originalEvent is undefined".
How can I fix this?