Question

When I get result from web sql DB and show them in the list, I face with the problem that I can't scroll on Android, by the way I am using cordova2.6.0.js with jqMobi and jqUI ; What I am trying to do is simply showing while appending new item on the list

<div id="firmList" class="panel" title="Firma">
   <div id="firmListInside" >
      <ul><li><a href="#firmID">Firma</a></li></ul>
      <ul><li><a href="#firmID">Firma</a></li></ul>
      <ul><li><a href="#firmID">Firma</a></li></ul>
   </div>
</div>

That code above is working fine and it is scrollable on both iOS and Android but when I tried with my result ;

$("#firmList").html('<div id="firmListInside"><ul></ul></div>');

for (var i=0; i< len; i++){
//some variable
$("#firmListInside > ul").append('<li><a href="#"'+myId+'>'+firmName+'></a></li> ');
}

When I execute it, that gives me the page with correct result but I cannot scroll it ! (ONLY ANDROID, on iOS same code working!)

Was it helpful?

Solution

Answered this on github, but for anyone else.

You can not update a panel's HTM using $().html() - this removes the scroller. You must use $.ui.updateContentDiv http://app-framework-software.intel.com/api/index.html#$.ui.updateContentDiv

$.ui.updateContentDiv("#firmList",'<div id="firmListInside"><ul></ul></div>');

Then you can access $("#firmListInside") no problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top