var compareValue = $('.info_compare td');
compareValue.each(function(){
var text = $(this).text();
text = str_replace(' ', '', text);
text = str_replace('\t', '', text);
text = str_replace('\r', '', text);
text = str_replace('\n', '', text);
text = str_replace('.', '', text);
text = str_replace(',', '', text);
text = str_replace('!', '', text);
text = str_replace('?', '', text);
text = 'compare_' + text.toLowerCase();
var td = $(this);
td.addClass(text);
console.log(td);
} |