Extending the matrixinput class 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!
You can listen to the add button's click event like so:

$('.matrix &gt; .buttons &gt; .add').on('click', function(e) {
    // your js
});