Salve a tutti e scusate la mia ignoranza, ho iniziato da pochissimo e spero pian piano di capirci qualcosa quindi spero che siate con me molto umani
ho questo script java che vorrei caricare sulla homa page del mio sito fatto in wordpress..
il countdown e' di 60 minuti e dovrebbe con delle immagini creare un countdown..ma non so' dove metterle e come help me plese...Vi ringrazio in anticipo siete gentilissimi!
ps. se c'e qualcosa di sbagliato vi prego di aiutarmi..
vi allego script
codice:
<script>var interval;
var minutes = 59;
var seconds = 59;
var firstCountdown = true;
function countdown(element) {
interval = setInterval(function() {
var mins, secs;
if (seconds == 0) {
if (minutes == 0) {
clearInterval(interval);
return;
} else {
seconds = 60;
}
}
if (seconds == 59) {
if (!firstCountdown) {
minutes--;
}
firstCountdown = false;
}
mins = minutes < 10 ? '0' + minutes : String(minutes);
secs = seconds < 10 ? '0' + seconds : String(seconds);
secs = secs == 60 ? '00' : secs;
var tempo = mins + secs + '';
document.getElementById("countdown0").src = "../img/countdown/" + mins.substr(0, 1) + ".jpg";
document.getElementById("countdown1").src = "../img/countdown/" + mins.substr(1, 1) + ".jpg";
document.getElementById("countdown2").src = "../img/countdown/" + secs.substr(0, 1) + ".jpg";
document.getElementById("countdown3").src = "../img/countdown/" + secs.substr(1, 1) + ".jpg";
seconds--;
}, 1000);
}
$(document).ready(function() {
countdown('countdown');
$("#testi-carousel").owlCarousel({ // Most important owl features
items: 1,
itemsCustom: false,
itemsDesktop: [1199, 1],
itemsDesktopSmall: [980, 1],
itemsTablet: [768, 1],
itemsTabletSmall: false,
itemsMobile: [479, 1],
singleItem: false,
startDragging: true,
autoPlay: true
});
$('.main-flex-slider').flexslider({
slideshowSpeed: 5000,
directionNav: false,
animation: "fade",
controlNav: false
});
});
</script>