In a section of my site, I display information when the user hovers over a link. Then, when the user mouseleaves the link, the display information should leave. Here is the code for this:
function hover_user(id_user){
$("#user"+id_user).mouseleave(function(){
displayinfo();
});
}
How do I add a click functionality so that when the user clicks on the link, the mouseleave is ignored and the information is displayed there until the user decides to mouseover another link?
Thanks!
.data()to set a boolean on the element onclick which you can always read onmouseleave and act accordingly.