Draw line from html element id to another html element with jquery and canvas

Viewed 7741

Is it possible to draw a line with html and jquery just by refering to the element id? I have an important word in a text and want to draw a line between this word and an image that describes it. I have seen that that it is possible to draw between elements with canvas but they have style position set to absolute. Since my element is a word in a text I can't set it to absolute. Example

<p>This is my text with this very <span id="important_word">important</span> word</p>
...
<img src="important.jpg" id="important_img"/>

Now I want a line drawn between the span and the img. Is it possible?

Thanks in advance!

2 Answers
Related