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
637 stars 123 forks source link

Does not work with class as selector #3

Closed intelligence closed 11 years ago

intelligence commented 11 years ago

Hello again,

Great that you were able to solve the other trouble I had with the script not working in Firefox. I've stumbled upon what seems to be another bug.

I got it working when using an unique id, but if I use: textFit(document.getElementsByClassName('content')); or even textFit($('.content'));

TypeError: el.getAttribute is not a function if (el.length === 0 || (!settings.reProcess && el.getAttribute('boxfitted'))) {

This is present both in Firefox and in Webkit.

STRML commented 11 years ago

Thanks for the report. It's looking like I need to add a basic jasmine suite to this project.