i'd use this:
jquery:Code:<div id="container> <img src="/path/to/image1.jpg"> </div> <div class="thumbs"> <a href="/" rel="/path/to/image1.jpg">image 1</a> <a href="/" rel="/path/to/image2.jpg">image 2</a> <a href="/" rel="/path/to/image3.jpg">image 3</a> </div>
why do you want the images to preload? its a waste of bandwidth if the user never clicks on a thumbnailCode:$('.thumbs a').click(funtion(evt) { evt.preventDefault(); $('#container img').attr('src', $(this).attr('rel')); });