Bricktop Posted August 28, 2008 Share Posted August 28, 2008 Hello all, I am using JCarousel to display a list of thumbnail images. What I would like to happen, is when a user clicks any one of the thumbnails, that image then gets loaded full-size into a div. I would like to achieve this without having the to refresh the page but can't get it to work. My code so far is: <div id="mainframe"> <div id="imagePane"> <img src="/pictures/image1.jpg"> </div> </div> <div id="scrollerframe"> <ul id="mycarousel" class="jcarousel-skin-tango"> <li><a href="#" onclick="getdata('/pictures/image1.jpg','imagePane');"><img src="/pictures/image1_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image2.jpg','imagePane');"><img src="/pictures/image2_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image3.jpg','imagePane');"><img src="/pictures/image3_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image4.jpg','imagePane');"><img src="/pictures/image4_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image5.jpg','imagePane');"><img src="/pictures/image5_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image6.jpg','imagePane');"><img src="/pictures/image6_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image7.jpg','imagePane');"><img src="/pictures/image7_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image8.jpg','imagePane');"><img src="/pictures/image8_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image9.jpg','imagePane');"><img src="/pictures/image9_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image10.jpg','imagePane');"><img src="/pictures/image10_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image11.jpg','imagePane');"><img src="/pictures/image11_sm.jpg"></a></li> <li><a href="#" onclick="getdata('/pictures/image12.jpg','imagePane');"><img src="/pictures/image12_sm.jpg"></a></li> </ul> </div> Am I going the right way about this? Is there an easier way to achieve my effect? Any help much appreciated as at present the above is not working at all! Quote Link to comment Share on other sites More sharing options...
Bricktop Posted August 28, 2008 Author Share Posted August 28, 2008 Whoops! I forgot a vital line of code. Fixed now! Thanks anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.