I would like to ask, if I am having a size selector created by an unordered list, like the picture shown below. I have also written some coding but seems they are not working. Currently they are not clickable and I can just make the border as the selected one by configuring its CSS.
<script>
$(function(){
$(“#selected_1").on("click", function(){
$("main li.s-attribute li.s-value").css("border-color:#2D4274;");})})
</script>
<li class="s-value">
<a href=“#” title=“size : 1” class=“size-anchor" id="selected_1">1</a>
</li>
<li class="s-value">
<a href=“#" title="size : 2" class="size-anchor">2</a>
</li>
<li class="s-value">
<a href=“#" title="size : 3" class="size-anchor">3
</a>
</li>
<li class="s-value">
<a href=“#" title="size : 4" class="size-anchor">4</a>
</li>
<li class="s-value">
<a href=“#" title="size : 5" class="size-anchor">5</a>
</li>
<li class="s-value">
<a href=“#" title="size : 6" class="size-anchor">6</a>
</li>
<li class="s-value">
<a href=“#" title="size : 7" class="size-anchor">7</a>
</li>
So I wonder how can I configure them to make them clickable and at the same time when I have clicked on it the corresponding number will be shown, i.e., SIZE — (Clicked) —> SIZE : 4?? Thanks