Page 1 of 1
Font awesome icon color
Posted: Mon Nov 04, 2019 9:39 pm
by bertrand
I have an icon and would like to change its color from JavaScript. I am too stupid to find the right style attribute. I can change the background color but cannot do it for the foreground color !
Re: Font awesome icon color
Posted: Tue Nov 05, 2019 7:08 am
by Pablo
With jQuery it will look something like this:
Code: Select all
$('#FontAwesomeIcon1').find('i').css('color', '#FF0000')
Re: Font awesome icon color
Posted: Tue Nov 05, 2019 9:10 am
by bertrand
Thanks the find 'i' was missing.