title: Change X and Y value of SVG elements with JavaScript
body: <p>I have a tspan element and I want it to move based on mouse position.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).mousemove(function(e) {
    //something that makes it so the x value is the same as e.pageX
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;svg viewBox="0 0 1778.426 150.81301"&gt;
  &lt;g transform="translate(0 -146.19)"&gt;
  &lt;rect x="15.368" y="225.71" width="1723.8" height="11.733"/&gt;
  &lt;rect id="bar" transform="rotate(90)" x="215.19" y="-15.368" width="32.781" height="11.733"/&gt;
  &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I do it without using transform?</p>