Change iframe source with jQuery

In order to change the source of an iframe with jQuery you have to change the src attribute of the HTML element

<iframe id="myFrame" src="http://www.example.com/"></iframe>

<script type="text/javascript">
    $("#myFrame").attr('src', 'http://www.example.com/new-url');
</script>