title: iScroll not working on iPhone for jquery show/hide
body: <p>I am building a phonegap application with iscroll used for scrolling. I am facing a problem when I dynamically append controls to a div and show/hide the div on click. The div shows up and then hides automatically. I have given the code samples below. Would greatly apperciate any help.</p>
  
  <p>First I tried with scroll.refresh() alone, but since it did not work, I tried destroying and recreating according to a forum post in google. But, it does not work either.</p>
  
  <h1>HTML</h1>
  
  <pre><code>&lt;div class="wrapper" id="wrapper"&gt;
          &lt;main class="content" id="scroller"&gt;
              &lt;ul&gt;
                  &lt;li&gt;
                      &lt;span id="usertype-link"&gt;
                      &lt;/span&gt;
                      &lt;div class="b-preferences__select b-preferences__select--type" id="search-user-type-div"&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/main&gt;
      &lt;/div&gt;
  </code></pre>
  
  <h1>JS</h1>
  
  <pre><code>$('#search-user-type-div').hide();
  $('#usertype-link').bind('click', function () {
      if ($('#search-user-type-div').is(":visible")) {
          $('#search-user-type-div').hide();
          $('#usertype-link').removeClass('open').addClass('close');
      }
      else {
          $('#search-user-type-div').show();
          $('#usertype-link').removeClass('close').addClass('open');
      }
      //scroll.refresh();
      searchpreferences.rebuildScroll();
  })
  
  rebuildScroll: function () {
      scroll.destroy();
      scroll = null;
      scroll = new iScroll('wrapper', { vScrollbar: true, hScrollbar: false, vScroll: true, hScroll: false, onBeforeScrollStart: null });
  
      //setTimeout(function () {
      scroll.refresh();
      //}, 0);
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Priyan</p>