Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I assume you got something like this:</p> <pre><code>&lt;img src="image.gif" width="145" height="126" alt="Elements" usemap="#elementmap" /&gt; &lt;map name="elementmap"&gt; &lt;area id="element1" shape="rect" coords="0,0,82,126" alt="Element 1"/&gt; &lt;area id="element2" shape="circle" coords="90,58,3" alt="Element 2"/&gt; &lt;/map&gt; </code></pre> <p>I supposed that you can call <code>$('#element1')</code> in your jQuery code to get the object and do something (I think could work because if you put a <code>click</code> event that fires an alert in the first element, it works!)</p> <p>By the other hand, maybe this could help you if you need the coords of the element dropped or just want the element be stablished on a div. Take a look at this example and edit it according to what you need:</p> <p>Look this first: <a href="http://www.placona.co.uk/166/javascript/a-more-elaborated-jquery-drag-drop-cloning/" rel="nofollow">http://www.placona.co.uk/166/javascript/a-more-elaborated-jquery-drag-drop-cloning/</a></p> <p>Live example: <a href="http://examples.placona.co.uk/drag_drop" rel="nofollow">http://examples.placona.co.uk/drag_drop</a></p> <p>Finally, a recommendation is not to work 100% with coords because when user resizes browser window, coords change and if you need them in a future time to recover positions and charge all them to the browser, it won't work good.</p> <p>Obviously I don't know if you need them but I am just saying. </p> <p>Hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload