Trouble With Toggle Button with 2 Icons Using Font Awesome
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I was using Material Icons but changed to Font Awesome and am having some trouble converting over. Here's a link to my JSFiddle: What I'm trying to do is have it go from being to and back again, but I can't figure out how that'd work.

What am I doing wrong here?


awarded to enderdba

Crowdsource coding tasks.

1 Solution

Winning solution

Here's an approach:

You were using the wrong query selector, and using a wrong set value. You need to select the <i> that's inside your select element. And also, you don't need to change the text value, you need to change the class attribute so it changes icon properly.

Thanks @enderba!
sharper 8 months ago