How to execute javascript within a modal
I have a modal that is initated with an action:
This opens the modal slideover correctly, and I see the correct content. However, I need to execute some javascript after the modal loads. I've tried updating my blade to do this:
I do have the
But that
This opens the modal slideover correctly, and I see the correct content. However, I need to execute some javascript after the modal loads. I've tried updating my blade to do this:
I do have the
@stack in my app.blade.php file:But that
console.log doesn't execute. So, I have two questions:- How do I execute JS in a modal
- There will be several table rows with the same action, that execute the same JS - is there a better way to do this?