I'm trying to call the addBlock function from the Matrix fieldtype. Whenever a block is added i need to run some basic javascript. Does anyone have an idea how to go about this? thanks!

1 Answer 1


You can listen to the add button's click event like so:

$('.matrix > .buttons > .add').on('click', function(e) {
    // your js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.