I have an weird problem. I'm trying to use jquery hover. But i can't get it to work correctly. The only way i can get i to work is by clicking on it. Are there any who can see there the issue might be? The HTML Part:
<a class="preview"><img id="EquipmentInfoPanelElementUrl" height="100" width="100" src="temp.png" alt="gallery thumbnail" /></a>
The javascript part:
$("a.preview").hover(function (e) {
$("body").append("<p id='preview'><img src='" + $("#EquipmentInfoPanelElementUrl").attr("src") + "' alt='Image preview' /></p>");
$("#preview").css("top", (e.pageY - 10) + "px").css("left", (e.pageX + 30) + "px").fadeIn("fast");
},
function () {
$("#preview").remove();
});
$("a.preview").mousemove(function (e) {
$("#preview").css("top", (e.pageY - 10) + "px").css("left", (e.pageX + 30) + "px");
});