You should note that the scripts is going to be run only once on the primary render from the part. If you should operate a JavaScript perform afterwards - emit the event with the component and hear it in JavaScript as explained listed here) https://laravel-livewire.com/docs/2.x/inline-scripts