I have a deferred function that binds a mouseenter event:
$(window).load(function(e) {
var $container = $(\'.container\');
$container.mouseenter(function
Mouseover event does exactly what you want.
If the .conteiner
does not exist in time you attach the mouseover event (is added dynamically in the future) you have to use .live method to attach the event.
$(".conteiner").live("mouseover", function() {
alert("hovered!");
})
It will work also when the mouse is already on the position, where the new element appears. Example here!
For jQuery 1.7+ you should use .on method instead as the .live method is deprecated. Example here!