title: How to highlight the transcript of a audio file?
body: <p>Im beginner in javascript so I'm very sorry for my amateurish codes.
  I have a audio and some text that is subtitles of it.
  I have the timestamps of conversation.
  for example the timestamp of "hi" in audio is "1.525487" sec.
  I want to highlight the text "hi"  in that moment.</p>
  
  <p>When I use a integer number for "span id" for example "ts1" it works correctly,
  but when I use decimal number like "1.525487" it dose not work.
  what should I do?</p>
  
  <p>Thanks for your helps.</p>
  
  <pre><code>&lt;body&gt;
  &lt;audio id = "adi" controls&gt;
  &lt;source src="Greeting.mp3"&gt;&lt;/source&gt;
  &lt;/audio&gt;
  
  &lt;div&gt;
  &lt;pre&gt;
  A: &lt;span id="ts1.525487"&gt;Hi&lt;/span&gt; , &lt;span id="ts2.193877"&gt;how are you doing?&lt;/span&gt;
  &lt;/pre&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  var spns = document.getElementsByTagName("SPAN");
  var audi = document.getElementById("adi");
  
  audi.addEventListener("timeupdate", f1);
  function f1(){
      var i;
      for (i = 0 ; i&lt; spns.length ; i++){
          if(spns[i].id == "ts" + audi.currentTime){
              spns[i].style.backgroundColor = "red";  
          }
      }
  }
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>