[jQuery] [tooltip] bodyHandler with image
Hello there,
I try to make a tooltip with a different image for each one on areas,
but i don't really understand how to use the bodyHandler function. I
tried different things, but I get a "bodyContent has no properties
[Break on this error] if (bodyContent.nodeType || bodyContent.jquery)
{" with firebug.
My html :
<map name="feature1" id="feature1">
<area title="11.png" shape="rect" coords="168,74,205,114"
href="#" />
<area title="12.png" shape="rect" coords="81,137,119,177"
href="#" />
<area title="13.png" shape="rect" coords="251,136,291,177"
href="#" />
</map>
Code :
$(function() {
$('area').tooltip({
delay: 0,
showURL: false,
bodyHandler: function() {
return $("<img/>").attr("title", this.src);
}
});
});
A great thank you for the persons who will reply :)