V
V
Vova1357982021-06-08 23:38:17
css
Vova135798, 2021-06-08 23:38:17

How to add class only on one page?

There is a menu in which the first item is always underlined, since the active class has been added. How can I make it so that this class is only added on one page. Is there any solution through js?
https://codepen.io/vladimir2021794/pen/wvJxdbO

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill, 2021-06-09
@Vova135798

https://codepen.io/invfrontend/pen/ExWpXZv as an option.
This option will need to be upgraded if you want to highlight links depending on the page where you are at the moment. For a single specific link, this option is also suitable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question