title: iOS div momentum scrolling without fixed height (content loaded via ajax)?
body: <p>I am creating an iOS web app that has a fixed div (say <code>200px</code> height) and the content inside of that scrolls. I don't like the default iOS scrolling, as it's not like the native scrolling you find by just swiping down through a webpage (the native scrolling in iOS has momentum, while the default one for <code>overflow</code> is without momentum).</p>
  
  <p>The <code>div</code> I am trying to scroll in has the following qualities:</p>
  
  <ol>
  <li>Set width </li>
  <li>Dynamic height (content via AJAX)</li>
  </ol>
  
  <p>The content is loaded from an external website into a <code>div</code> using jQuery AJAX, and there is an option to reload the AJAX request. This means that, depending on the amount of content in the loaded page, the height of the <code>div</code> will change.</p>
  
  <p>I can't seem to find any solutions that allow momentum scrolling in iOS where the <code>div</code> doesn't have a set with, and I've tried the following:</p>
  
  <ol>
  <li><code>- webkit-overflow-scrolling: touch</code></li>
  <li><a href="http://cubiq.org/iscroll-4" rel="nofollow">iScroll</a></li>
  </ol>
  
  <p>And the problems with these:</p>
  
  <ol>
  <li>This was my first choice, as it's just a <code>css</code> tag and usually works fine. It's new though and has a lot of bugs, including a deal breaker one for my web app. If you <code>focus</code> on an <code>input</code> element, the page zooms in (even with the <code>meta</code> tag set to <code>user-scalable:no</code>) and doesn't zoom out until you type text in the text box, and then everything is off by <code>3px</code>.</li>
  <li>This solution is laggy and the height needs to be fixed. Using it's refresh function is too cumbersome as it needs to be called when the AJAX request is reloaded, when the page is reloaded, if elements are hidden, etc.</li>
  </ol>
  
  <p><strong>TL;DR: Are there any solutions other than <code>-webkit-overflow-scrolling</code> and <code>iScroll</code> that will allow me to use momentum scrolling on a div with a dynamic height (content loaded in via AJAX) in iOS?</strong></p>