title: jQuery scrollTop not working inside iframe on iOS
body: <p>iOS and iframes.. such a pain.
  I've a simple <em>back to top</em> button which should animate the scrolling (instead of just jumping to the top of the page). </p>
  
  <pre><code>$(document).on('click touchstart', '.backtotop', function() {
      $('html, body').animate({ scrollTop: 0 }, 1500);
  });
  </code></pre>
  
  <p>This works everywhere, except for iframes on iOS. I still haven't fully understood how iOS handles iframes. jQuery's .scrollTop() function won't work either (which can't be animated anyway).</p>
  
  <p>The only thing which works in iframes on iOS is this:</p>
  
  <pre><code>parent.self.scrollTo(0, 0);
  </code></pre>
  
  <p>Obviously not the best solution since this won't work for desktop browsers.
  Any deeper knowledge on how to fix this or iframes on iOS in general is greatly appreciated.</p>