Hello, I have a button with a fontaweasome icon, I would like to make that when I click it, it changes to another icon, can I do that?
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
I do not want to have 2 buttons, I want that when I press the + symbol it changes to the symbol - and when I open the symbol - it changes to the + symbol
In your click event use the jQuery toggleClass() method to change the font awesome classes.
If you need help with this please build a simple test case so we can see everything you have.
and the event
My idea is that it has only one button and that when I touch it it changes the shape from + to -
As I said, use toggleClass() in the click event. For example:
Click the 'Name' button to see the class toggle.
If you need help with this then please build a running test case (not code snippets).
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.