title: Jquery detect change or keyup on body tag within iframe
body: <p>I have a <a href="http://akzhan.github.com/jwysiwyg/help/examples/01-basic.html" rel="nofollow noreferrer">jwysiwyg</a> content editor control on my page. The control works by creating itself in an iframe which has a full html page code within it.</p>
  
  <p>I wish to detect if there has been a <code>change</code> or <code>keyup</code> so I can use our "indicate the record needs to be saved" code. We have input boxes and this work fine, just this 3rd party editor control is giving us problems.</p>
  
  <p>Here is what the page source looks like:</p>
  
  <pre><code>&lt;div id="this_is_our_div_Container"&gt;
      &lt;div class="wysiwyg"&gt;
          &lt;iframe id="f_Body-wysiwyg-iframe"&gt;
              &lt;html&gt;
              &lt;body style="margin: 0;" class="wysiwyg"&gt;
                  I just typed this now!&lt;/body&gt;&lt;/html&gt;
          &lt;/iframe&gt;
      &lt;/div&gt;
      &lt;textarea class="wysiwyg" cols="20" id="f_Body" name="f_Body" rows="2" 
          style="display: none;"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>See that the body tag contains the changes in real time.</p>
  
  <p>With these SO questions...</p>
  
  <p><a href="https://stackoverflow.com/questions/7757293/jquery-if-change-or-keyup">jQuery &#39;if .change() or .keyup()&#39;</a></p>
  
  <p><a href="https://stackoverflow.com/a/1639342/511438">https://stackoverflow.com/a/1639342/511438</a></p>
  
  <p>I have tried the following in document.Ready:</p>
  
  <pre><code>$('iframe').contents().find('body.wysiwyg').live('change', function (e)
  {
      alert('testing');
  });
  $('iframe').contents().find('body.wysiwyg').live('keyup', function (e)
  {
      alert('testing');
  });
  $('iframe &gt; *').bind('keyup', function (e)
  {
      alert('testing');
  });
  </code></pre>
  
  <p>Hopefully this printscreen will help.
  <a href="https://i.stack.imgur.com/Sk0rd.png" rel="nofollow noreferrer">LARGER</a> 
  <img src="https://i.stack.imgur.com/Sk0rd.png" alt="enter image description here"></p>