Reputation: 3323
I have the following code:
$('#table1 .set2').each(function()
{
alert($(this).html());
});
This brings back a range of %'s currently in an alert box.
99%
87%
12%
What I need to do is remove the %
character so I am left with a number that I can use.
Any suggestions welcomed.
Upvotes: 0
Views: 8810
Reputation: 2585
I believe, this should work for you
$('#table1 .set2').each(function()
{
var number=$(this).html().trim().slice(0,-1);
alert(number);
});
Upvotes: 0