I have built a count down in jQuery so the count down will go from 5 down to 0 and when it hits 0 it will show an alert. Now i want to show a dynamic image instead of that alert.
So here is my timer / jQuery code
<script>
window.onload = function(){
(function(){
var counter = 5;
setInterval(function() {
counter--;
if (counter >= 0) {
span = document.getElementById("count");
span.innerHTML = counter;
}
// Display 'counter' wherever you want to display it.
if (counter === 0) {
alert('this is where it happens');
clearInterval(counter);
}
}, 1000);
})();
}
</script>
So now instead of the alert I need it to show:
<div style="float: right; display: inline-block; margin: 6px;">
<div class="skip_btn">
<a href="<?php echo $long_url2 ;?> ">SKIP AD >></a>
</div>
</div>
<div style="clear:both;"></div>
Is there any way to do that?
Is something like this working?
It`s displayed in response element.
I removed your php code from the link because I had no idea where is it coming from, but you can still use it like this