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

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

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

The canvas has been tainted by cross-origin data in chrome only -