Answer the question
In order to leave comments, you need to log in
js, html5 drag and drop objects?
Task:
1. There is an object like:
<a href="http://google.ru" title="Это Google" pic="http://localhost/pics/google_logo.jpg">Google</a>
<a href="http://google.ru" title="Это Google"><img src="http://localhost/pics/google_logo.jpg" /></a>
Answer the question
In order to leave comments, you need to log in
On the draggable release, write a handler that will catch the attributes from $(this) and insert what you need.
If html5 suits you, then you can do something like this:
http://jsfiddle.net/HyGKa/26/
PS javascript is not my forte :)
Yes, the most logical thing is to use JqueryUI.
Here you can look at the events when the element is dropped .
When you link to a textarea, the dragstop event will fire. You hang a function on it that looks - where did you throw this element and if you threw it correctly - copies the link to the textarea
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question