First javascript program, I'm looking for draggable functionality
similar to ghosting except I don't want the source of the drag to
disappear after the drop. I want to have an image, and be able to
repeatedly drag clones off of that image. Here's some code that's
almost what I need:
function make_draggable(elem) {
new Draggable(elem.id, {} );
elem.onmousedown = create_clone;
}
function create_clone() {
new_clone = this.cloneNode(true);
Position.absolutize(this);
this.parentNode.insertBefore(new_clone, this);
}
document.getElementsByClassName('draggable_image').each(make_draggable);
Except that the source of the clones is no longer draggable, and I
don't want the destination clone to clone further when it's dragged.
Any ideas?
Thanks,
Aaron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---