title: jQuery "after-click" event
body: <p>I have a list of links that open in an iframe, like:</p>
  
  <pre><code>&lt;ul id="frameTrigger"&gt;
      &lt;li&gt;&lt;a target="iframe1" href="aaa.html"&gt;&lt;img src="aaa.jpg"&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a target="iframe1" href="bbb.html"&gt;&lt;img src="bbb.jpg"&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a target="iframe1" href="ccc.html"&gt;&lt;img src="ccc.jpg"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I need to update another div <em>after</em> the link is clicked. Specifically, I need to call a function that checks the frame's <code>src</code> attribute and update the div. If I do a:</p>
  
  <pre><code>$("#frameTrigger a").click(function() {
      var iframe = $("iframe[name=iframe1]").get(0);
      console.log(iframe.contentWindow.location.href);
      // the problem here is that that the iframe.window.location will
      // change AFTER this function returns
  });
  </code></pre>
  
  <p>I do not get what is expected.</p>