HTML5: Can't drag on-the-fly created <div> tag even though draggable='true' Do I need to "BLESS"
Posted
by Pete Alvin
on Stack Overflow
See other posts from Stack Overflow
or by Pete Alvin
Published on 2010-03-13T18:56:56Z
Indexed on
2010/03/13
19:25 UTC
Read the original article
Hit count: 304
After creating a div on the fly with this markup:
$('.circuit').prepend("<div class='component' draggable='true'>TRANSISTOR</div>");
It is NOT draggable itself :(
Is jQuery prepend() the correct way to create "live" tags in the DOM?
Do I need to somehow bless it a different way to make draggable=true really work?
How to I wire it up so that on-the-fly divs can be draggable?
AFTER NOTE: I added a static div and that is draggable. INTERESTING: I view both the static and dynamic using FireFox F12 Firebug and they are identical. But one is draggable and one is not!!!
© Stack Overflow or respective owner