Skip to content

Tag: font-awesome

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. Answer If you want to change icon/style just add other class

Trying to create an icon font awesome inside JS

I am trying to create a font awesome icon next to the list item, but it keeps giving me [object HTMLElement] any Idea why ? //The icon add classes Thank you Answer The right way to insert your icon is not You should use li.appendChild(icon) instead. You can do the same with a textnode for your input text 🙂 He…

FontAwesome Icon Picker Plugin For Bootstrap not showing

I want to use fontawesome picker on my website. I followed this tutorial: https://www.jqueryscript.net/other/Simple-FontAwesome-Icon-Picker-Plugin-Bootstrap.html I added the two files in my project fontawesome-iconpicker.js and fontawesome-iconpicker.css My input: My JS: I see no javascript error and when I c…

Programmatically get FontAwesome unicode value by name

Following the steps outlined in this answer, I am setting my cursor to a FontAwesome icon. Now, I would like to set the cursor to any icon, by class name (for example, fa-pencil). To accomplish this, it seems like I would need to be able to programmatically lookup the unicode value of a given icon. I know tha…