var all = $('td');
var value, td, comp;
for(var i = 0, ref = all.length; i < ref; i++){
td = $(all[i]);
value = td.text();
console.log(value);
for(var j = 0; j < ref; j++){
comp = $(all[j]);
if(i == j || comp.hasClass('colored')) continue;
if(value == comp.text()){
td.addClass('colored');
comp.addClass('colored');
}
}
}
.colored{
background: #ccc;
}
<div class="col-xs-12 col-md-6 col-lg-4 one-portrait text-center">
...
</div>
<div class="col-xs-12 col-sm-6 col-lg-4 one-portrait text-center">
...
</div>