how to call range::-webkit-slider-runnable-track?
<p>Basically I need to call <code>.range::-webkit-slider-runnable-track</code> using either jquery or javascript so I can make some changes over to it's background and do other implementations over it.</p>

<p>To be precise I am currently using </p>

<pre><code>$('&lt;style&gt;.myrange::-webkit-slider-runnable-track{background:linear-gradient(to right, white'+val+'%, #bbb '+val+'%);}&lt;/style&gt;').appendTo('head');
</code></pre>

<p>This works pretty much fine, but the problem is that I'm calling <code>.myrange::-webkit-slider-runnable-track</code> like couple of thousands of times which every time it appends to head my range gets to face some performance issue and so.</p>

<p>I would really appreciate if some one tell how to do this with something like <code>$('.myrange::-webkit-slider-runnable-track').css("background", "black");</code></p>

<p>Question Update:</p>

<pre><code>&lt;input type="range" value="0" min="0" max="100" id="myrange" class="myrange"/&gt;
</code></pre>

<p>This <code>range</code> has connected to a video which track the video duration and changes the color of the track up to the point that the video has been watched.</p>

<p>And to do the coloring of the range tracker this is what I am doing:</p>

<pre><code>vid.addEventListener('progress', function() {
    var range = 0;
    var bf = this.buffered;
    var time = this.currentTime;

    while(!(bf.start(range) &lt;= time &amp;&amp; time &lt;= bf.end(range))) {
        range += 1;
    }
    var loadStartPercentage = bf.start(range) / this.duration;
    var loadEndPercentage = bf.end(range) / this.duration;
   var loadPercentage = loadEndPercentage -      loadStartPercentage;

   val = loadPercentage*100;
   thmpos = $('.vidskb_r').val();
   var style = $("&lt;style&gt;", {type:"text/css"}).appendTo("head");
   style.text('.vidskb_r::-webkit-slider-runnable-track{background:linear-gradient(to right, #ff7e20 '+thmpos+'%, #fff '+thmpos+'%, #fff '+val+'%, #bbb '+val+'%);}');

});
</code></pre>

<p>Thanks in advance:)</p>