User:Nuecat233/common.js

var items = new Array; len= document.getElementById('skill-list').getElementsByTagName('tr').length;

for (i=0;i<len;i++){ items[i]=document.getElementById('skill'+(i+1)); }

items.forEach(function(item,index){           index++;            item.onclick=function{                items.forEach(function(item_){ item_.style.backgroundColor='coral'; document.getElementById('skill_content').innerHTML=document.getElementById('skill_nr'+index).innerHTML; })               item.style.backgroundColor='#66ccff';            }        })