Thank you very much, I’m making some progress here.
That first solution is a bit over my pay grade at the moment
I declared a local variable instead, which worked. How could I set this to occur incrementally, indefinetly? If that makes sense?
function big () {
document.getElementById("result").style.fontSize = "xx-large";
}
function small () {
var adjustText= document.getElementById("result").style.fontSize = "small";
}
bigger.addEventListener ("click", big);
smaller.addEventListener ("click", small);
That makes sense to ensure I style in CSS but No, I just used those 3 sizes at the moment, pending a different solution. Ideally, I would like to be able to write the functions in such a way that every time you click the + or - it will incrementally increase/decrease the font 10px, lets say. I think this is what you were alluding to in your second solution? But I’m not sure I understand how to implement?
var adjustText = document.getElementById('result').style.font++;
var adjustTextSmall=document.getElementById('result').style.font--;
function big () {
document.getElementById("result") = adjustText;
}
function small () {
document.getElementById("result").style.fontSize = adjustTextSmall;
}
bigger.addEventListener ("click", big);
smaller.addEventListener ("click", small);
var result = document.getElementById("result");
var currTextSize = 20;
result.style.fontSize = currTextSize + 'px';
function big () {
currTextSize + 10;
}
function small () {
currTextSize - 10;
}
bigger.addEventListener ("click", big);
smaller.addEventListener ("click", small);