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:

normal

this when hover menu:

hover

this when selected "over ons":

selected

and when unselect button:

unselected

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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -