Salve ragazzi,
ho trovato questo script in jquery, per far apparire un tooltip su appositi link.
Funziona tutto meno per una cosa.... il tooltip viene visualizzato solo la prima volta che vai con il mouse nell'area d' effetto, mentre le volte successive non viene più visualizzato a meno che non ricarichi la pagina.
Come posso modificarlo, xchè mi venga visualizzato il tooltip tutte le volte che vado con il mouse sull'area d'effetto?
codice:
this.screenshotPreview = function ()
{
/* CONFIG */
xOffset = 10;
yOffset = 10;
// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result
/* END CONFIG */
$("a.screenshot").hover(function (e)
{
this.t = this.title;
this.title = "";
$("#" + this.rel)
.css("top", (e.pageY - xOffset) + "px")
.css("left", (e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function ()
{
this.title = this.t;
$("#" + this.rel).remove();
})
$("a.screenshot").mousemove(function (e)
{
$("#" + this.rel)
.css("top", (e.pageY - xOffset) + "px")
.css("left", (e.pageX + yOffset) + "px");
});
};
// starting the script on page load
$(document).ready(function ()
{
screenshotPreview();
});