I have a button using wire:click and a function call with a Jquery to change the color of the button.
It works when I use wire:ignore, but no function call, the button turns green and stays green.
When I use wire:click, the function call is made and the button turns green and back to white.
<button id="10" type="button" wire:click="addTip(10)" class="w-1/3 border-black bg-white py-2 font-bold text-xl mr-6 text-center pointer" style="border-width: 10px;">10%</button>
<script>
$(document).ready(function() {
$(document).on('click','button#10', function (){
$(this).toggleClass('bg-green-500');
});
});
</script>