Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

konsoul

macrumors newbie
Original poster
Hi Guys,

I've been progressing along ok on the CSS side of things but am having some trouble on the javascript side of things. I've decided to jazz a site up with a scrolling gallery from a template i'm using but unfortunately I don't know how to get the main image to change on a click of the smaller one? can anybody please help a brother out!

here's the site template - http://dev.jeffking.co.uk/index.html

All i'm after is the big main image to change to the same (larger) image of the smaller one in the scrollbar below the main frame.

I'm pretty sure I will need to tweak the JS to enable me to do this but i don't know how or what to do. please can someone help me!!

Many thanks!
 
Give the img tags inside the li.fragment something like onClick="document.getElementById('bigimage').src='css/gallery/gallery1.jpg';"

And then give the img inside the div.big-image the id of "bigimage".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.