title: Add Active Class to Current selected svg using js
body: <p>the svg id = "map" <br>
  the normal path class = "T" <br>
  Selected class ="Tactive" <br>
  Tcurrent is a active shave by Default</p>
  
  <pre><code>var oMap= document.getElementById("map");
  var oRng= document.getElementsByClassName("T");
  var Tcurrent
  
  
  for (var j = 0; j &lt; oRng.length; j++) {
  
    oRng[j].addEventListener("click", function () {
    Tcurrent = document.getElementsByClassName("T Tactive");
    Tcurrent[0].classList ="T" 
    this.classList = "T Tactive";
  
    });
  
  }
  </code></pre>