<div id="gallery">
<div class="scrollable">
<div class="items">
<div>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
</div>
</div>
</div>
</div>
5つの画像リンクが処理されるたびに、itemsクラス内に別のdivコンテナが追加されます。配列が15の画像リンクを含んでいた場合、最終結果は次のようなものになります。
<div id="gallery">
<div class="scrollable">
<div class="items">
<div>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
</div>
<div>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
</div>
<div>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
<img src="URL_from_array"/>
</div>
</div>
</div>
</div>
というように配列の最後までです。何か案は?
編集:コードの識別について申し訳ありません、投稿時にそれはねじ込みました。
Edit2:明確化。
は、ページがロードされた*後に、このサーバー側ではなく、*を行うことが可能ではないです試してみてください? –
はい、可能ですが、私はこのクライアントサイドをさまざまな理由でやりたいと思います。 –