title: Adding a URL to an Iframe being called by Fancybox2-AJAX Based on the Iframe's ID
body: <p>Okay I have this working minus the fact of having this working once I call in with fancybox via AJAX.</p>
  
  <p>Static Example Works:</p>
  
  <pre><code> &lt;iframe id="videourl1" width="640" height="340" src="" frameBorder="0"&gt;&lt;/iframe&gt;
   &lt;iframe id="videourl2" width="640" height="340" src="" frameBorder="0"&gt;&lt;/iframe&gt;
   &lt;iframe id="videourl3" width="640" height="340" src="" frameBorder="0"&gt;&lt;/iframe&gt;
  
  $("div.video-container iframe").each(function(){var idAdd=$(this).attr("id");$(this).attr("src","http://www.youtube.com/embed/"+idAdd+"?rel=0&amp;autoplay=0&amp;modestbranding=1&amp;showinfo=0&amp;autohide=1")})
  </code></pre>
  
  <p>Now when I take this and pull the 3 iframes into .txt files and call them from an index.html file using fancybox2-ajax call it fails:</p>
  
  <p>Index.html:</p>
  
  <pre><code>  &lt;a id="1" class="fancybox fancybox.ajax" href="text/1.txt"&gt;Link&lt;/a&gt;
    &lt;a id="2" class="fancybox fancybox.ajax" href="text/2.txt"&gt;Link&lt;/a&gt;
    &lt;a id="3" class="fancybox fancybox.ajax" href="text/3.txt"&gt;Link&lt;/a&gt; 
  </code></pre>
  
  <p>Text files contain the iframes:</p>
  
  <pre><code>  &lt;iframe id="videourl" width="640" height="340" src="" frameBorder="0"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>How do I code the JS to say run each time when the iframe is called in by AJAX?</p>