I’m trying to make some text I have as an attribute of an element toggle up when the cursor is hovering. Currently, I’m seeing weird things happening with this code, but feel like I’m very close…any ideas?
$(".hoverDes").mousemove(function(){
$(".hoverDes").toggle(function(e){
var hoverIt = $(this).attr("hoverDesDiv");
$("#hoverDiv").text(hoverIt).show();
$("#hoverDiv").css("top", e.clientY-30).css("left", e.clientX-50);
}).mouseout(function(){
$("#hoverDiv").hide();
})
});
Your question is not clear enough to me but from your code above I guess you need this