Remember to note that the scripts are going to be run just once upon the first render of the part. If you have to operate a JavaScript function later on - emit the event through the component and hear it in JavaScript as explained right here) https://laravel-livewire.com/docs/2.x/inline-scripts