I'm trying to create a <input type="range">
that increases and / or decreases the size of the text as we move it to the left or right.
So far so good, I've been able to create this effect, but now I wanted to put a number to indicate font-size
current, after we've moved <input type="range">
and I've blocked that part.
Here is the code I have so far:
$("#fader").on("input",function () {
$('#v-28').css("font-size", $(this).val() + "px");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><pid="valor-fontSize">40</p>
<input class="none" type="range" min="14" max="40" value="0" id="fader" step="1" >
<p id="v-28">
Após uma viagem que se prolongou por mais de nove anos e em que percorreu 4,8 mil milhões de quilómetros a New Horizons passou o mais perto de Plutão às 11:49 TMG (12:49 em Lisboa) em piloto automático, divulgou a NASA na rede social Twitter.
</p>
Here is an example in jsFiddle too: link
If it were a
input
you could put the number or value offont-size
we want the text to stay and at the same time moveinput range
to the place where this value would supposedly be located ininput range
would be even better.