Stop Vimeo video with javascript – inside a loop and using a modal window

Finally i got the solution:

        <script> 

            jQuery("#mascara").click(function() { 
                $('.video-player').each(function(index) {
                    $(this)[0].contentWindow.postMessage('{"method":"unload"}','*');


                });
            });

        </script>