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
You can listen to the add button's click
event like so:
$('.matrix > .buttons > .add').on('click', function(e) {
// your js
});