title: Detect click in iframe
body: <p>I having trouble detecting clicks in an iframe(iframe id is <code>'#ptifrmtgtframe'</code> and  tag id is <code>'#CLASS_SRCH_WRK2_SSR_PB_CLASS_SRCH'</code>).  I have tried:</p>
  
  <pre><code>$('#ptifrmtgtframe').click( function() {
    $('#CLASS_SRCH_WRK2_SSR_PB_CLASS_SRCH').click( function() {
  
      console.log("clicked");
    });
  });
  </code></pre>
  
  <p>I have also tried </p>
  
  <pre><code>var htmlDocument = document.querySelector('#ptifrmtgtframe').contentDocument;
  
  $(htmlDocument).contents().find('#CLASS_SRCH_WRK2_SSR_PB_CLASS_SRCH').on('click', function() { 
    console.log("clicked");});
  </code></pre>