I'm pretty new to jQuery and Javascript!
I've made a image gallery where you can click on small thumbnails below and it selects that picture and shows it in a bigger box.
What I want to add is a button on each side of the bigger image which you click on and it changes to the image to the left or right. Problem is, I just can't figure out how :P
(example: https://imagizer.imageshack.us/v2/757x654q90/34/t4y1.png)
So this is the code for the click on image and it changes to the image you clicked on:
<script type="text/javascript">
function changePic(img) {
$("#gallery_img").hide();
$("#gallery_img").attr ("src", img.src);
$("#gallery_img").fadeIn("slow")
}
</script>
And this is the HTML part (only the image buttons):
<div id="gallery_buttons">
<img id="right" src="pics/right.png"></img>
<img id="left" src="pics/left.png"></img>
</div>
Thanks in advance! :)