I would go with something like this:
<script type="text/javascript">
jQuery(document).ready(function($) {
$('body').live('click',function(){
if($('div.reveal-modal-bg').is(':visible')){
$('div[id*=myModal] iframe').each(function() {
$(this).attr('src', $(this).attr('src'));
});
};
})
});
</script>
The $('div[id*=myModal] iframe')
selects all divs with an ID that contains "myModal", please note that you would need to change this if you are using a different HTML tag.
Despite this, I am not sure of the purpose of your code, what you are trying to achieve.