Skip to content
Advertisement

Toggle Class With Font Awesome Not Working

I have multiple buttons, when a like button is clicked I would like the font awesome icon to switch as well, however, the way I have it set up the font awesome icon just disappears, but I can see the class change. Not sure where to go from here.

JavaScript
JavaScript

Advertisement

Answer

If you want to change icon/style just add other class to toggleClass like:

JavaScript
JavaScript
Advertisement