Closed Boldewyn closed 13 years ago
whoah awesome. thank you. i just tested it on the example.html and it looks like you'll need to change line 18 to:
var origFontSize = parseInt($this.css('font-size')); // init the font size
I was getting NaN for the font-size. patch that guy and i'll make it live!
Done. I used parseFloat, since it might be something like 14.5px as well.
The comparison with the ternary operator is unnecessary, if you use the built-in Math.min function. Then you can even completely skip var fontResize.
The resizer function also doesn't need the "obj" variable, since it always points to $this.