javascript - Append JS to not include a % character -


i have 1 json value writing html , css following js:

$('#team2-keyplayer2-rating').css('width', data[team1].keyplayers.keyplayer1.rating); $('#team1-keyplayer1-rating').html(data[team1].keyplayers.keyplayer1.rating); 

the first command working great. it's controlling % of css bar. second command writing value html.

ie: "90%"

my issue dont want show "%" when writing html. there way delete % writing html without deleting % json?

or can use replace

data[team1].keyplayers.keyplayer1.rating.replace('%', '') 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

javascript - Which segment of a polyline was clicked? -

c# - Avoiding duplicate methods for Task and Task<T> -