jquery mobile - Listview with many items is too slow when create -


i work on mobile app using , phonegap , app have jquerymobile listview many items (more 20 items li ) , every li have textbox , 3 radio buttons , when try create , refresh listview using code :

$("#listview").trigger('create').listview().listview("refresh"); 

it takes 15 second create listview .

any 1 know how can speed create of listview many items?

below handelbar template used populate listview:

<ul data-role="listview" data-inset="true" id="lstquestions">     {{#each data}}          <li data-role="fieldcontain"  >             <label  >{{dorder}} - {{title}}</label>              <fieldset data-role="controlgroup" data-type="horizontal"  >                 <input type="radio" name="rdo-{{id}}" id="rdo-{{inspectionid}}-{{id}}-3" value="3" data-theme="c" />                 <label for="rdo-{{inspectionid}}-{{id}}-3">nothing</label>                  <input type="radio" name="rdo-{{id}}" id="rdo-{{inspectionid}}-{{id}}-2" value="2" data-theme="c" />                 <label for="rdo-{{inspectionid}}-{{id}}-2">no</label>                  <input type="radio" name="rdo-{{id}}" id="rdo-{{inspectionid}}-{{id}}-1" value="1" data-theme="c" />                 <label for="rdo-{{inspectionid}}-{{id}}-1">yes</label>              </fieldset>             <fieldset data-role="controlgroup" class="fieldsetclass">                 <label for="txt-{{id}}">comment</label>                 <input type="text" id="txt-{{id}}" name="txt-{{id}}" value="{{comment}}"   />             </fieldset>         </li>      {{/each}} </ul> 

qudah.
i'm have been develop app phonegap jquery mobile. in jquery mobile, listview very slow. if have many item ever never use listview.
solution: should rewrite listview , ignore data-role="listview", app faster.

    <ul>         <li>         <li>     </ul>     //very faster     <ul data-role="listview">         <li>         <li>     </ul> 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -