First off, apologies if I leave out info - a bit new to js.
I have some script on a new site that has four little images in a row on the right of the page, which, when you click on each of those images, a bigger image, as well as some copy, comes up on the right. I was recently told that the customers want next/previous arrows around the four little images so they 'know' that the images do something 'else'.
Basically what I need is some script that will make the next and previous buttons work, keeping in mind that the 'onclick' of those will need to load not just an image, but copy as well.
This is the current script:
Code:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
function LoadFeature(WhichFeat){
var FeatureImages=new Array();
var FeatureCopy=new Array();
FeatureImages[0]=link and image;
FeatureImages[1]=link and image;
FeatureImages[2]=link and image;
FeatureImages[3]=link and image;
FeatureCopy[0]=<p>Text relating to FeatureImages(0)</p>;
FeatureCopy[1]=<p>Text relating to FeatureImages(1)</p>;
FeatureCopy[2]=<p>Text relating to FeatureImages(2)</p>;
FeatureCopy[3]=<p>Text relating to FeatureImages(3)</p>;
$("#features-inner-left").empty();
$("#feature-text").empty();
$("#features-inner-left").html(FeatureImages[WhichFeat]);
$("#feature-text").html(FeatureCopy[WhichFeat]);
}
</script>
<body>
<a href="javascript:LoadFeature(0);"><img src="0.jpg" /></a>
<a href="javascript:LoadFeature(1);"><img src="1.jpg" /></a>
<a href="javascript:LoadFeature(2);"><img src="2.jpg" /></a>
<a href="javascript:LoadFeature(3);"><img src="3.jpg" /></a>
</body>
I guess I would like the next and previous buttons to load those features whenever they're clicked (like +1 or something). Looking forward to your help!! Thanks.
Bookmarks