Answer the question
In order to leave comments, you need to log in
Why doesn't mouseout style change work when moving from parent node to child node?
Good afternoon!
The element has mouseover/mouseout handlers that change the color of the element when the cursor is hovered over.
Following the logic described here and here , the color change should also occur when the cursor moves from the parent node to the child.
For some reason my script is not working as expected. FF 34.05, Chrome 39 and Safari 7.1.2 only change color when the cursor is completely outside of the element.
View code on fiddle
Answer the question
In order to leave comments, you need to log in
Because when moving from the parent node to the child node, there is no mouseout, the mouse is still over the parent element. But you can disable the propagation of the event, and then everything will be ok
jsfiddle.net/zv044qaL/4
To change the style of an element, use the css :hover pseudo-class. Mouse events are not designed for such tasks. I myself encountered a situation where the mouseout code does not work correctly. Updating the browser solved this problem, but you can't expect all users to have modern browsers.
I didn’t have discrete mathematics, but I would solve it this way. There are statements:
Л: Пс Бд
П: Лс Бд
Б: Лс Пе
Л-П
are connected through Бд
, and П-Б
through Лс
, a pair remains Л-Б
- one of them is true both times, the other is false both times. !Лс
. П: !Лс Бд
Лс
be false, B’s statements must also be made false. So, B lied both times, and L told the truth both times:Л: Пс Бд
П: !Лс Бд
Б: !Лс !Пе
Л П Б Пс Бд Лс Бд Лс Пе
0 1 2 0 0 1 1 0 1 конфликт Бд и Лс
0 2 1 0 0 0 1 1 1 конфликт Бд и Лс
1 0 2 1 1 0 0 0 1 конфликт Бд
2 0 1 0 1 0 0 1 1 конфликт Бд и Лс
1 2 0 1 1 0 1 0 0 ОК
2 1 0 0 1 1 1 0 0 конфликт Лс
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question