javascript - iScroll not working on iPhone for jquery show/hide -


i building phonegap application iscroll used scrolling. facing problem when dynamically append controls div , show/hide div on click. div shows , hides automatically. have given code samples below. apperciate help.

first tried scroll.refresh() alone, since did not work, tried destroying , recreating according forum post in google. but, not work either.

html

<div class="wrapper" id="wrapper">         <main class="content" id="scroller">             <ul>                 <li>                     <span id="usertype-link">                     </span>                     <div class="b-preferences__select b-preferences__select--type" id="search-user-type-div">                     </div>                 </li>             </ul>         </main>     </div> 

js

$('#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); } 

any appreciated.

priyan

i don't have exact solution, recommend use recent version of iscroll (v5). totally rebuild , maybe fixes problem.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -