I made a script that, when you hover the mouse, repaints each item in the menu white, and when the mouseout event returns black. However, when you hover the mouse cursor, other elements are also repainted white.

enter image description here Here is the link http://test3.testkz.ru/

 $("#cssmenu ul li").mouseover(function() { $(".has-sub a span").css("color", "white"); }).mouseout(function() { $(".has-sub a span").css("color", "black"); }); 
  • Because you selector $(".has-sub a span") indicated that when hovering ALL spans turn white. Read about $(this) in jQuery. In general, in this case it is better to do without the css by applying the pseudo-class :hover . - DogeDev

1 answer 1

remove js code and do it in CSS

style.css line 567

 #cssmenu ul li span:hover, #cssmenu ul li:hover { color: #fff; } 

replace with

 #cssmenu ul li:hover > a * { color: #fff; } 
  • Thank !!! Happened! - Jehnsen D Montreal