skip to Main Content

Hello so I’m using Shopify and I want to replicake what someone did on this shop
https://www.pancake-malin.com/
http://www.screencast.com/t/cjB8LQLdn

Basically it is a random number generated which evolves each 5 seconds

So I’m quite a beginner with coding.
The dedicaded line is coding in HTML through my theme (page template), so in my case at this URL https://www.tresor-ethnique.com/collections/apache/products/collier-tribal-plumes
I have written: Plus de 14 commandes en cours !

Of course I just have a static number for now

I don’t know if I just need to insert a HTML code for that, or if I need to insert HTML + CSS in “edit code”

Can anyone let me know?

Thank you 🙂 !

2

Answers


  1. Chosen as BEST ANSWER

    Integration on a list would give:

    <li class="visite"><strong><span id="update1">80</span><script>   var element1 = document.getElementById('update1');    setInterval(function(){     element1.innerHTML = Math.floor((Math.random()*5)+80);       }, 5000); </script> visiteurs montrent de l’intérêt</strong></li>
    

  2. <p>
      Random number between 1 and 10: <span id="update">1</span>
    </p>
    
    <script>
      var element = document.getElementById('update'); 
      setInterval(function(){
        element.innerHTML = Math.floor((Math.random()*10)+1);   
       }, 5000);
    </script>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search