How to increase and decrease font with each click? I was looking for ways to do this dynamically, but I just found an example in jQuery here , but my project does not use jQuery, how can I do this using pure javascript?
My basic yet static code:
function escala(size) {
var text = document.querySelector('p');
text.style.fontSize = size + 'px';
}
<button onclick="escala(10)">-</button><button onclick="escala(20)">+</button>
<p>FONT</p>