title: Jquery accessing $(parent.document).scrollTop from iFrame and SOP
body: <p>I am trying to access scrollTop value from within an iFrame with src= <a href="http://www.domain.com/folder/" rel="nofollow">http://www.domain.com/folder/</a> while the page containing the iFrame is at <a href="http://sub-domain.domain.com/another-folder/" rel="nofollow">http://sub-domain.domain.com/another-folder/</a> using the code shown below yet I am getting the following error:</p>
  
  <pre><code>var stopval = $(parent.document).scrollTop();
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Error: Blocked a frame with origin "http://www.domain.com" from accessing a cross-origin frame.
  </code></pre>
  
  <p>Obviously it is an SOP issue, so was wondering if there were any work arounds...approaches to solve this issue? I've searched the web but couldn't find a solution getting scrollTop value from the iFrame page without receiving this error. Thanks</p>