title: Styling a fancybox iframe that is opened programatically
body: <p>I am able to style fancybox iframe links with the following block of code: </p>
  
  <pre><code>$("#fancy").fancybox({
      type        : 'iframe',
      maxWidth    : 800,
      maxHeight   : 600,
      fitToView   : false,
      width       : '600px',
      height      : '590px',
      autoSize    : false,
      closeClick  : false,
      openEffect  : 'none',
      closeEffect : 'none'
  });
  </code></pre>
  
  <p>Applied to a fancybox iframe link:</p>
  
  <pre><code>&lt;a id="fancy" data-fancybox-type="iframe" href="includes/schedule.php"&gt;link&lt;/a&gt; 
  </code></pre>
  
  <p>The problem that I am having is that the same is not working for a fancybox iframe link that I am opening programatically, within the following script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          $('.submit').click(function() {
              var email = $(this).val()
              var varData = '&amp;email=' + email;
              document.getElementById('beep').play();
              $.ajax({
                     type: "POST",
                      url:'mailer.php',
                     data: varData,
                  success: function() {
                      javascript:parent.$.fancybox.open({href : 'includes/thankyou.php', id: 'thanky', type: 'iframe'});
                  }
              });
          });
      });
  &lt;/script&gt;   
  </code></pre>
  
  <p>The iframe is being opened with fancybox, but styling is just not being applied in this case. </p>
  
  <p>Thanks in advance for any help.</p>