Jump to content

[SOLVED] Load image from thumbnail (using JCarousel)


Bricktop

Recommended Posts

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.