Following the first step how to Edit Running Time in you aurora script, now we've learn how to edit the timer.js to run the bar image
So let's start now...
First you have to do is go to your public_html/yourdomain/source/clicking and find timer.js, after you find it then start to edit the file.
Edit the function of adTimer, find timer-- then replace with timer++
next step is find the if(timer == 0) then replace with this if(timer == fulltimer).
then edit the show variable where showing => Click "+key;
and replace with => Click <img src=\"clickimages/"+key+".png\">";
Go and find $("#timer").html(show); then move to inside function of adTimer timer++
In the else condition you can remove the variable of var show="Wait: "+timer;
Last step is add $("#bar").width((timer/fulltimer)*200); after else condition.
at the final your js code will look like this :
function adTimer() {
timer++;
if(timer == fulltimer) {
var show="Click <img src=\"clickimages/"+key+".png\">";
$("#buttons").fadeIn();
$("#timer").html(show);
}
else {
setTimeout(adTimer, 1000);
}
$("#bar").width((timer/fulltimer)*200);
}
No comments:
Post a Comment