Javascript text Resize
Posted
by blackessej
on Stack Overflow
See other posts from Stack Overflow
or by blackessej
Published on 2010-05-04T17:38:02Z
Indexed on
2010/05/04
18:38 UTC
Read the original article
Hit count: 196
Without getting into the "should a text resizer be used or not" debate, I'd like some help with this...suffice to say that my clientele are from and older generation and may be sight impaired...
My script isn't functioning, and I'm not sure why. It's not live yet, so here's what I'm working with:
function fsize(size,unit,id){
var vfontsize = document.getElementById("#colleft");
if(vfontsize){
vfontsize.style.fontSize = size + unit;
}
}
var textsize = 14;
function changetextsize(up){
if(up){
textsize = parseFloat(textsize)+2;
}else{
textsize = parseFloat(textsize)-2;
}
}
I'm using onclick events to trigger the size changes. Thanks for your help!
© Stack Overflow or respective owner