1

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!

2

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, privacy policy and cookie policy

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