var elem=document.querySelectorAll('.element');
for (var i=0;i<elem.length;i++){
elem[i].addEventListener('click',F);
}
function F(){
var currentValue=this.innerHTML=parseInt(Math.random()*9),
elValue=0;
if(!elem)
elem=document.querySelectorAll('.element');
for(var i=0;i<elem.length;i++){
elValue=parseInt(elem[i].innerHTML);
if(currentValue==elValue){
elem[i].setAttribute('title','This value == '+currentValue);
}else if(currentValue>elValue){
elem[i].setAttribute('title','This value < '+currentValue);
}else
elem[i].setAttribute('title','This value > '+currentValue);
};
}