How can I make my listed items add an ID when clicked, or what am I doing incorrectly?
$('.ex-menuLi #tt').attr('id', 'test');
$('.ex-menuLi').on('click', function(){
$(this).attr('id', 'test').siblings().removeAttr('id', 'test');
});
<nav id="extraMenu">
<!--<ul id="ex-menuUl"> -->
<li class="ex-menuLi" id="ex-menuLiId"><a href="#" class="test1" id="tt">Test</a></li>
<li class="ex-menuLi" id="ex-menuLiId"><a href="#" class="test1">Test2</a></li>
<li class="ex-menuLi" id="ex-menuLiId"><a href="#" class="test1">Test3</a></li>
<!--</ul>-->
</nav>
#test{
text-decoration:underline;
}