* 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
2017-04-18 00:18 (edited 2017-04-18 00:19 by Graham ) · (0)
* 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 ,
2017-05-10 10:14 · (0)
* Mwebvendor How to force download the video that .mp4 format? no streaming.
2017-05-10 12:21 · (0)
* 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
2017-05-10 21:46 (edited 2017-05-10 23:12 by Graham ) · (0)

Online: Guests: 1