Reputation: 3977
So there are two elements on top of eachother. How do i call a function as soon as the element (under the one on top) is hovered?
Thanks alot, I really need this to work :s
Upvotes: 2
Views: 1017
Reputation: 144689
You can use CSS pointer-events
property:
In addition to indicating that the element is not the target of mouse events, the value none instructs the mouse event to go "through" the element and target whatever is "underneath" that element instead.
#top {
pointer-events: none;
}
$('#underneath').hover(function(){
....
})
Upvotes: 4