STRML / textFit

A jQuery-free component that quickly fits single and multi-line text to the width (and optionally height) of its container.
https://textfit.strml.net
643 stars 122 forks source link

Doesn't work in Firefox #2

Closed intelligence closed 11 years ago

intelligence commented 11 years ago

Just tested your demos in Firefox on OSX and nothing happens at all. Works just fine in Safari and Chrome but Firefox will not do anything.

skarmavbild 2013-08-19 kl 13 00 46

STRML commented 11 years ago

Thanks for reporting - I will look into it. It is surely a side-effect of the recent jQuery removal. Until I fix it, feel free to use the past jQuery version if you are using jQuery on your site.

intelligence commented 11 years ago

Come to think of it, I've had troubles with "getElementsByClassName" in Firefox before, it doesn't seem like it's supported as it should. Were never able to solve it so I just stuck with jQuery instead.

STRML commented 11 years ago

Okay - the example is working in Firefox now. I'm a newcomer when it comes to manipulating the DOM directly (too many years of jQuery) so I had been setting el.style['font-size'] when I should have been setting el.style.fontSize. I guess you learn something pedantic every day.