Uhm , I guess the problem is caused by the fact you're using toggleClass()
; when you click
the menu voice it actually toggleClass()
, but when you mouseout()
it toggleClass()
again. Try applying a control on mouseout
like
if($('ul.userl-links').hasClass('visuallyhidden')){
..
}
else { }
using addClass()
and removeClass()
instead of toggleClass()
If you make a fiddle, I'll edit the question to answer better.