Remember to Notice that your scripts will be run just once on the very first render of your component. If you must operate a JavaScript functionality afterwards - emit the event in the element and listen to it in JavaScript as described here) https://laravel-livewire.com/docs/2.x/inline-scripts