html - Jquery scrolldown css not working -
ok, after fixing dissapear problem (element disappearing on click) have new problem that, think, related problem.
when click on header link page scrolls down, jquery, right article. function works great. other function changes css of according button on position on page (scrolltop()
). function works. when clicked button css not change. makes button white link gray "clicked" border arround (done browser). when click anywhere else on screen (to remove "active" button state) button changes color.
i not replicate problem jsfiddle (fiddle) here images describing problem above:
this menu:
this when hover menu:
this when selected "over ons":
and when unselect button:
now question is, how can give selected button (image 3) same css unselected button (image 4)?
this style text-decoration:none
not work. using :active
css attribute not work.
i cannot seem find solution on internet. missing something?
solution
thanks drops answer! :focus
did trick. never heard of before, worked. thanks!
you should take @ css pseudo-class :focus
, here docs.
this answer tell more difference between :focus
, :active
pseudo-classes.
cheers.
Comments
Post a Comment