Is it possible to cleanly combine this function.
I am using mouseenter function to show my ajax page content and hide it with mouseleave
$(function() {
$("#card_client").mouseenter(function(){
$("#results").load("data/show_card.php");
$("#results").show();
});
$("#card_client").mouseleave(function(){
$("#results").hide();
});
});
2
Answers
Now when I hover over the data displayed by "#results" the display flashes. I would like it to stay fixed
Use
.hover()
to combine them into one call:The first function is executed when you start hovering, the second when you stop.