Jquery each loop, get then wait for click
<p>I am really struggling with ideas on how to get this to work (or even if it is possible) but what I need to do is inside an each loop:</p>

<p>Start of each loop
Change source of iframe
Wait for frame to load
Run a get which modifies some on page content
Then wait for user to click one of 2 buttons
Next item in loop</p>

<p>Is that possible with jquery? So far I have:</p>

<pre><code>$.each(arr, function (index, value) {

var url = this.url;
$('#frameid').attr('src',url);
//need to wait for iframe to finish loading here
$.get("ajax.php", {action:'findfields',url:url}, function(result){
    //do some stuff which I already have working
});
//wait for button click and then next in loop

});
</code></pre>
