Oh God Why does this not work??? Ok, trying to be cool now x).
The HTML part Im fetching with JQUery is:
<div class="chip">
#<c:out value="${pred.id } "></c:out><span class="closebtn">×</span>
</div>
I use this JQuery to fetch the elements with class "chip":
function getChips() {
var output = "";
$('.chip').each(function() {
output += $(this).text().trim();
});
output = output.replace(/U00D7/gi,"");
return output;
}
So. It does fetch the correct elements. So far so good. and function above returns the inner text of each element of class "chip".
But it does NOT replace the "times" character that can be seen in the html fragment above.
I tried:
output = output.replace(/U00D7/gi,"");
and I tried:
output = output.replace(/×/gi,"");
and even being desperate and trying:
output = output.replace(/x/gi,"");
and:
output = output.replace(/X/gi,"");
Still get an output from the function with × symbols in it. I expect a string with × symbols replaced with a space or even better, nothing at all ->"".
Thanks