I have the following problem:
I'm getting the value of date-img when I hover in the .gettoll class, but I need to replace that value here content: "<img src='IMAGEM AQUI'>",
when hovering over each of the items, the problem is that everyone is displaying the same image.
NOTE:
li's
is withinwhile()
using a carousel I I simplified it to put here ...
Would anyone have any idea how to solve the problem?
JS
<script>
$(document).ready(function() {
$(".gettool").hover(function(){
var imagetooltip = $(this).data("img");
console.log(imagetooltip);
});
$(".tooltip").tooltipster({
animation: "grow",
contentAsHTML: true,
content: "<img src='IMAGEM AQUI'>",
multiple: true
});
});
</script>
HTML
<ul>
<li><a href="#" class="gettool tooltip" data-img="images/qualquer.jpg"><img src="images/01.jpg"></a></li>
<li><a href="#" class="gettool tooltip" data-img="images/qualquer.jpg"><img src="images/01.jpg"></a></li>
<li><a href="#" class="gettool tooltip"data-img="images/qualquer.jpg"><img src="images/01.jpg"></a></li>
</ul>