+ 1
How to code this Javascript event. mouseenter or mouseover?
I want to make js function wich displays hidden block in it target parent block on hover. But im not sure wich event will fire it up corectly. Suppose there are same blocks - with same classes on which I want this event to run.
4 Answers
+ 5
You will call a event on the target
$("#target").mouseover(function() {
var parent = $(this).parent();
parent.children(".hidden").show();
)};
Because they have same classes you could use :first-children or add an id to it
+ 3
Your case is easily solved by pure css:
.parent:hover .child {
display: block;
}
And this way is preferable.
0
Thank a lot man, already solved đ
0
I will try that !