title: iframe height, dynamic content
body: <p>i have an aplication that loads iframes as tabs (jqueryTabs) how can i set the iframe height to fit the content?</p>
  
  <p>i know that i can create a function loke:</p>
  
  <pre><code>function fit(iframe) {
      iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";
  }
  </code></pre>
  
  <p>and call it onLoad but the problem is that my iframe will change his content using ajax so i need a wey to resize the iframe dynamicaly.</p>
  
  <p>i was tinking in somthing like:</p>
  
  <pre><code>$(HTMLIFrameElement).ajaxComplete(function ()
  { fit(this)}
  );
  </code></pre>
  
  <p>but it dos not work</p>
  
  <p><em><strong></em>**<em>*</em>*</strong><em>EDIT</em><strong><em>*</em>**<em>*</em>**<em>*</em></strong>
  Afther Webberig answer, w shuld i do?:</p>
  
  <p>use an each to iterate al iframes or pass a specific id?</p>
  
  <p>each:
  pros
  easy to implement</p>
  
  <p>cons
  performance? (average iframes 3-4 max 100)</p>
  
  <p>specific id
  pros
  performance?</p>
  
  <p>cons
  have to define and mantain specifics id for many iframes</p>