How to make a class change when clicking on a link will not be removed click on it?

If you remove a link click then it works, but I need the link had a transition. How to make a class change when clicking on a link will not be removed click on it?
<div class="lang">
 <a href="?lang=EN" class="active-lang">Russian</a>
 <a href="?lang=en">English</a>
</div>

.lang {
 position: absolute;
 top: 47px;
right:120px;
 z-index: 1;
}
 .lang a {
 color: #000;
 background: #fff;
 padding: 8px 12px;
 border-radius: 10px;
 border: 2px solid #fecc00;
}
 .lang a.active-lang {
 background: #e31e24;
}

$(function() {
 $(".lang a").click(function() {
 $(".lang a").removeClass('active-lang');
$(this).addClass('active-lang');
})
});
July 2nd 19 at 14:14
0 answer

Find more questions by tags jQuery