Graham
Mwebvendor The blog twig data array has a
data.device so you can use a
{% if data.device == 'web' %}....{% else %}....{% endif %}
NOTE
data.device returns mobile/touch/web so you will need to allow for that depending on which form you want to 'touch' devices to see
Mwebvendor
Graham do you have an idea how to create a javascript or xtscript of creating countdown before the button? I mean, after the 5sec. countdown finished the button will shown ,
Mwebvendor
How to force download the video that .mp4 format? no streaming.
Graham
Mwebvendor add
?__xt_download=1 to the link to force download (only works on local files)
A simple live countdown timer (one of many methods)
Set the delay by changing the value in the div
<div id="countdown" >5</div>
<script type="text/javascript">
var seconds;
var temp;
function countdown() {
seconds = document.getElementById('countdown').innerHTML;
seconds = parseInt(seconds,10);
if (seconds == 1) {
temp = document.getElementById('countdown');
temp.innerHTML = "Your download link goes here";
return;
}
seconds--;
temp = document.getElementById('countdown');
temp.innerHTML = seconds;
x = setTimeout(countdown, 1000);
}
countdown();
</script>
Copy code