title: AjaxComplete not working
body: <p>I am working on the Opera workaround for printing IFrame. Now we all know that the only way to print an Iframe is to open it in a new window and then print it. The issue that I am facing is that when my IFrame is opened in a new window a series of ajax calls are triggered and I want to open the print window when all the ajax calls are completed. I searched a bit and found the global callback event ajaxComplete. I have my code something like this:</p>
  
  <pre><code>if($.browser.opera){
              var href = $("iframe:visible")[0].contentWindow.location.href;
              var printWindow = window.open(href, "printWindow", "scrollbars=yes");
              printWindow.onload = function(){
                  $(this.document.getElementsByClassName("f-buttons")).hide();
                  $(this.document.getElementsByClassName("f-progress")).hide();
  
              }
              $(printWindow.document.body).ajaxComplete(function( event, xhr, settings ){
                  printWindow.print();
              });
              $(printWindow).ajaxComplete(function( event, xhr, settings ){
                  printWindow.print();
              });
  
  
          } 
  </code></pre>
  
  <p>I am not sure why the event is not getting triggered at first I tried it on the document as the documentation of ajaxComplete shows that it should only be attached to document but some people have suggested here that it can be attached on body too so I have tried this on body too but it is not getting initialized. Can anyone please tell me what am I missing on?</p>