title: How can I use $(this) inside of Fancybox's onComplete event?
body: <p>I'm trying to use jQuery's <code>$(this)</code> inside of Fancybox's <code>onComplete</code> event, but I'm running into trouble.  Here's my javascript code:</p>
  
  <pre><code>$('a.iframe').fancybox({  
    centerOnScroll: true,  
    onComplete: function(){  
      var self = $(this);  
      var title = self.title;  
      alert(title.text());  
    }  
  });
  </code></pre>
  
  <p>I have simplified the code above to get my point across, but I actually would love to use <code>$(this)</code> for several reasons that I won't go into here.</p>
  
  <p>Fancybox's documentation shows examples of using <code>this</code> instead of <code>$(this)</code>within its documentation, but I didn't see any examples where either were used inside of <code>onComplete</code> or other events.  I of course tried using <code>this</code>, much to no avail.</p>
  
  <p>Does anyone know how I can reference the triggered <code>a.iframe</code> element by using <code>$(this)</code> or any other means <em>within</em> the <code>onComplete</code> event?</p>
  
  <p><strong>Edit:</strong>
  I got this to work using <a href="https://stackoverflow.com/users/269746/blackcoat">Blackcoat</a>'s suggestion, and here's the final syntax that worked:</p>
  
  <pre><code>$('a.iframe').fancybox({
    centerOnScroll: true,
    onComplete: function( links, index ){
      var self = $(links[index]);  
      var title = self.find('.title').text();  
      alert(title); 
     }
  });
  </code></pre>