This is my first post here. I think
I want this script to only switch between two sizes.
<script type="text/javascript">
var min=10;
var max=18;
function increaseFontSize() {
var p = document.getElementsByTagName('td');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 10;
}
if(s!=max) {
s += 1;
}
p[i].style.fontSize = s+"px"
}
}
function decreaseFontSize() {
var p = document.getElementsByTagName('td');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 10;
}
if(s!=min) {
s -= 1;
}
p[i].style.fontSize = s+"px"
}
}
</script>
So I'd be super happy if someone could remove the 80% of the script that is unneeded for me. (No, really, I am that noob.)
Thanks in advance.