i made a function, which is called, when whenever someone clicks on one of the little pictures, as you can see in the picture below. My functions, which are to be executed look like this:
function makePicSmall(giveString){
if(firstTime){
firstTime = NO;
makePicBig(giveString);
}else{
$("#bigPic").animate({width:0, height: 0}, 1000);
window.setTimeout(makePicBig(giveString,1000));
}
}
function makePicBig(sourceString){
document.getElementById("bigPic").style.visibility = "visible";
document.getElementById("bigPic").src = sourceString;
$("#bigPic").animate({width:320, height: 586}, 3000);
}
My function is called like:
<a class="lilPic1Link" >
<img src="resources/littleFlyingDoggScreen1.png" alt="Willkommen-Screen" width="52" height="93" id="lilPic1" onClick="makePicSmall('resources/flyingDoggScreen1.PNG')">
</a>
<a class="lilPic2Link" >
<img src="resources/littleFlyingDoggScreen2.png" alt="screen1" width="52" height="93" id="lilPic2" onClick="makePicSmall('resources/flyingDoggScreen2.PNG')">
</a>
<a class="lilPic3Link" >
<img src="resources/littleFlyingDoggScreen3.png" alt="screen2" width="52" height="93" id="lilPic3" onClick="makePicSmall('resources/flyingDoggScreen3.PNG')">
</a>
But when I click on a little picture, I get: Uncaught ReferenceError: makePicSmall is not defined.
Here is a picture so you don´t have to imagine that stuff.
Why do I get this error? And how can I fix it? Thank you in advance!