I wanted to ask you guys how i can toggle back and forth when a button is clicked.
I have two “font-awesome” icon, and each time this icon is clicked i want it to change to the one who is not selected of the two. This is what i tried so far.
(".toggleOnOff").click(function(){
//noShow just has "display:none" Its used to hide/show an element on my page.
(".helpFC").toggleClass(“noShow”),
//This one is used to remove the class on the to then add the other icon class name.
$(".toggleOnOff").removeClass(“fa-toggle-on”),
$(".toggleOnOff").addClass("fa-toggle-off");
How can i then revert it? Is it by using “if” statements?