I am looking for a solution to efficiently display numerous image thumbnails within a limited space.
My plan is to organize the thumbnails into 3 columns with an undetermined number of rows. I intend to place this content inside a viewport div, structured as follows:
<div id="viewport" style="width: 300px; height: 300px; overflow: hidden;">
<div id="content" style="width: 300px; height: 100000px;">
Insert rows of thumbnails here
</div>
</div>
<a href="javascript:ScrollUp()">Previous</a>
<a href="javascript:ScrollDown()">Next</a>
I aim to achieve a scroll effect similar to Autotrader's image control by adjusting the topMargin property of 'content' using JavaScript upon clicking one of the buttons.
While I don't have extensive experience with JavaScript, I am unsure of where to begin. Could someone provide guidance on how to proceed?