title: Dynamically update Linear Gradient CSS
body: <p>How to dynamically change the argument value of linear-gradient using javascript / Jquery? I have to change both color and its percentage as per user choice and the range slider value respectively. 
  I have written the below code, but it is not working. As we have to put linear-gradient in " " and due to double quotation mark all arguments turn into simple string.</p>
  
  <pre><code>var gradColor1 = `${this.color1} ${percentage}%`;
  var gradColor1 = `${this.color1} ${percentage}%`;
  slider.style.background =linear-gradient(to left, gradColor1, gradColor1);
  </code></pre>