Fetching Matrix rows with Javascript
The Craft.MatrixInput class that manages each Matrix field doesn’t actually get assigned to a variable, so there’s no way to reference it right now. We probably won’t change that, since there wouldn’t be much point to it in the first place. The class doesn’t provide any sort of object-oriented API for managing the blocks; there’s no need for it in the current implementation.

If you want to get a reference to all the blocks’ containers, you can just use a jQuery selector:

var $blocks = $('#fields-myMatrixField &gt; .blocks &gt; div');

$blocks.each(function() {
    var $block = $(this),
        id = $block.data('id');
    // ...
});