-1
I have two Uttons, one to activate category and one to disable, each with its layout. I need to switch between the two, when one activates, it changes in the bank to activated and is being displayed while the other does not appear and vice versa. However I am not understanding the logic of how to do this. I know it is with ajax, for an alteration.php for example.
<button class="on-default remove-row text-warning"><i=class="fa fa-thumbs-o-down"><i></button>
<button class="on-default remove-row text-success"><i=class="fa fa-thumbs-o-up"><i></button>
Someone can give a boost?
right, but to do this check in the database first before changing?
– Caio Brandão
I built it right in php and it changes but it gives refresh on the page, so I want in ajax
– Caio Brandão
Just check if the category is active with Ajax. This site shows how to use Ajax: http://api.jquery.com/jquery.ajax/. With the return of the Ajax query you decide what to do with the button, as I put above.
– Lindomar
OK, I’ll try here, thank you
– Caio Brandão