Good morning. I've stumbled upon a little problem, if you could help me it'd be great.
I've searched for Tooltips that support HTML content but most that I've found only support text passed by the html title attribute. The only one I've found that supports HTML code inside the tooltip was the jQueryTOOLS one http://jquerytools.org/
I've already developed the Tooltip on mousehover but I want to make it onclick. I've tried to change the line 13 of the file ntip.js from:
jQuery(this).hover(function() {
to:
jQuery(this).click(function() {
with no success.
Here's my tooltip code:
<body>
...
<span class="formInfo">
<img src="./produtos/subcategoria_portugues/$result4[0]" width="100" height="180">"; // imagem
<span style=\"display: none;\" class=\"mycontent\">
// tooltip content
</span>
</span>
<script type="text/javascript">
$(document).ready(function(){
$(".formInfo").tooltip(
{
tooltipcontentclass:"mycontent"
}
)
});;
</script>
</body>
Then I've added the following lines of code before the closing of the head tag:
<script type="text/javascript">
$(".formInfo").tooltip({
events: {
tooltip: 'click, click'
}
});
</script>
But the tooltip is still being shown on mousehover (default behaviour) instead of onclick. Do you know what I'm doing wrong?
Thanks in advance