「onclick」または「href」機能を備えたボタンで構成される jquery モバイル グリッドを作成したいと考えています。ボタンの数は、実行時に動的に作成する必要があります。たとえば、このコード ブロックはライブラリ インデックスのように機能するはずです。ライブラリ ボタンをクリックすると、ボタンのグリッドに「書籍名」が表示され、書籍名のボタンをクリックすると、作成される書籍の「章番号」で構成されるボタンの別のグリッドが表示されます。本の選択時に動的に。グリッドを作成するための私の静的 html コードは、
<div class="ui-grid-d" id="book_chooser">
<div class="ui-block-a"><button class="ui-bar ui-bar-a" style="height:30px">Book A</button></div>
<div class="ui-block-b"><button class="ui-bar ui-bar-a" style="height:30px">Book B</button></div>
<div class="ui-block-c"><button class="ui-bar ui-bar-a" style="height:30px">Book C</button></div>
<div class="ui-block-d"><button class="ui-bar ui-bar-a" style="height:30px">Book D</button></div>
<div class="ui-block-e"><button class="ui-bar ui-bar-a" style="height:30px">Book E</button></div>
<div class="ui-block-a"><button class="ui-bar ui-bar-a" style="height:30px">Book A</button></div>
<div class="ui-block-b"><button class="ui-bar ui-bar-a" style="height:30px">Book B</button></div>
<div class="ui-block-c"><button class="ui-bar ui-bar-a" style="height:30px">Book C</button></div>
<div class="ui-block-d"><button class="ui-bar ui-bar-a" style="height:30px">Book D</button></div>
<div class="ui-block-e"><button class="ui-bar ui-bar-a" style="height:30px">Book E</button></div>
<div class="ui-block-a"><button class="ui-bar ui-bar-a" style="height:30px">Book A</button></div>
<div class="ui-block-b"><button class="ui-bar ui-bar-a" style="height:30px">Book B</button></div>
<div class="ui-block-c"><button class="ui-bar ui-bar-a" style="height:30px">Book C</button></div>
<div class="ui-block-d"><button class="ui-bar ui-bar-a" style="height:30px">Book D</button></div>
<div class="ui-block-e"><button class="ui-bar ui-bar-a" style="height:30px">Book E</button></div>
このボタンのグリッドは、本の数に基づいて実行時に動的に作成する必要があります。
phonegapプラグインでjquery、javascript、およびhtml5を使用しています。
助けてください。
前もって感謝します。