title: Get parent of clicked tag inside of iframe
body: <p>I've an iframe that contain an HTML page.Now I want to get class of the parent item that clicked.<br>
  this is my ifram:  </p>
  
  <pre><code>&lt;iframe src="//example.com" id="frame" &gt;&lt;/iframe&gt;  
  </code></pre>
  
  <p>this is css:  </p>
  
  <pre><code>#frame{  width:380px;  height:420px;}  
  </code></pre>
  
  <p>this is my script:  </p>
  
  <pre><code>$(document).ready(function() {
    var iframe = document.getElementById('frame');
    var innerDoc = iframe.contentDocument || iframe.contentWindow.document.body;
    $(innerDoc).on('click', function(e) {
      var thisID = ((e.target).id);
      alert(thisID);
      alert(innerDoc.getElementById(thisID));
  
  
      $(thisID).click(function() {
        var Allclassnames = $(thisID).parent();
        console.log(Allclassnames);
      });
    });
  });
  </code></pre>
  
  <p>but it return the item was clicked only.how to fix it?   </p>
  
  <p>Demo:<a href="https://jsfiddle.net/talebihamid/821ohtev/2/" rel="nofollow">DEMO</a>  </p>
  
  <p><code>NOTE</code>:these are in a same domain.maybe below <code>DEMO</code> not worked for this reason.but I'm sure that my HTML is inside of the same domain with my web site.
  thank you.</p>