title: jQuery: Control CSS with range slider
body: <p>How is it possible to control CSS with a range slider via jQuery?</p>
  
  <p>Some example code:</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>$('.font_size').on('input', function() {
    var fontsizeval = $(this).attr('value');
    var fontsizemin = $(this).attr('min');
    var fontsizemax = $(this).attr('max');
    $('.text').css("font-size", fontsizeval + "px");
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>* {
    font-size: 12px;
  }
  
  .text {
    font-size: 120px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;div class="text"&gt;Text
    &lt;div&gt;
  
      Font Size: &lt;input class="font_size" type="range" value="120" min="30" max="200"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Would be very thankful for help!</p>