How to make so that the link remained so after clicking on it?

I am a novice and do not understand how to get the link after clicking on it with black, like others, has become here such and remained.
5c9f76214cba1719663751.png
March 19th 20 at 09:18
6 answers
March 19th 20 at 09:20
Solution
Using JS to keep track of the Kli on the link if was click add class active when clicking on another to remove the class from the previous links and add on only what the user clicked.

Then in the css make a class active to the link.
March 19th 20 at 09:22
Solution
I solved the problem this way for tabs
jQuery:
$('.contentMenu a').on('click', function(){
$('.contentMenu a').removeClass('active');
$(this).addClass('active');
})

CSS:
.active {
color:#fff;
.......
}

most likely there is Varick easier :)
March 19th 20 at 09:24
Here's what happens:
https://codepen.io/anon/pen/axoXxv - makenna27 commented on March 19th 20 at 09:27
@makenna27because all 3 links lead to the same place, watermelon sees them as the same)
Add to # for example ciry, i.e. htef=the#1 href=#2... - Macy.Denesi commented on March 19th 20 at 09:30
@makenna27, https://codepen.io/anon/pen/oOvVGo - Macy.Denesi commented on March 19th 20 at 09:33
March 19th 20 at 09:26
a:focus {
color: orange;
text-decoration: underline;
}
It turns out that if I click on another, for example a block, the effect disappears, and I need him to stay.
https://codepen.io/anon/pen/BEBbNO - makenna27 commented on March 19th 20 at 09:29
@makenna27, js then you need - rosalinda.Altenwerth commented on March 19th 20 at 09:32
@rosalinda.Altenwerth, Thank You. - makenna27 commented on March 19th 20 at 09:35
@makenna27, Please - rosalinda.Altenwerth commented on March 19th 20 at 09:38
March 19th 20 at 09:28
I suspect that this is Taba. For tabs we need to use JS and hook class, for example .active on taboo.
March 19th 20 at 09:30
I understand that you have an active link was so visualisierung or when you go on this link and then back to the main that you have this reference was that color?

Find more questions by tags LayoutJavaScriptCSS