I'm sorry nobody has responded to you yet. I'm not terribly familiar with HTML5 drag and drop, but this article made me a little wary (warning to gentle souls: lots o' cussing in there):

"The HTML5 drag and drop disaster"
http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html

You might have a better chance of getting help with your issue if you posted to the jquery-ui group. The devs there are likely to have had more experience with HTML5 drag and drop, even though I wonder why you wouldn't just use jQuery UI's .draggable() and .droppable() methods in the first place.

--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 15, 2009, at 7:55 AM, eid wrote:

No one?

On Dec 10, 8:37 pm, eid <php...@gmail.com> wrote:
Hello.

I am coding some HTML 5 drag and drop support where the user can drag
images from a library to a textarea, and the necessary HTML to include the image will then be added. The addition of the html is done through
a function that takes a <li> element as an argument and then does the
rest.

The problem is that the drag and drop of any image results in the
first <li> being sent to the function so clearly there's something
wrong with my document traversing. Please take a look at the code
below:

The HTML can be seen here:http://hb.pastebin.com/m28f90fc8

And the relevant JavaScript is here:http://hb.pastebin.com/m1cf6fec1

If I drag 2.JPG.thumbnail.jpg to the textarea it should add the HTML
for the 2.jpg but it doesn't, it adds 1.jpg - So "var asset =
event.parentNode;" in the JS gets the wrong element.

Any ideas how to fix it?

Thanks

Reply via email to