davatron5000 / FitText.js

A jQuery plugin for inflating web type
http://fittextjs.com
6.76k stars 1.39k forks source link

Fittext.js not working without $(document).ready()? #5

Closed ghost closed 13 years ago

ghost commented 13 years ago

I'm by no means a jQuery expert, but I can't seem to get fittext to work in my current project without $(document).ready(). When I use $(document).ready(), it works with undesired results. For example, if I resize my window in any direction, the targeted text gets rapidly smaller. Any ideas?

FYI, I'm building a responsive/adaptive Wordpress theme based on Roots. I disabled the other jQuery plugins used in Roots by default (Modernizr, Respond) to see if they might be contributing to the issue, but to no avail.

Thanks!

ghost commented 13 years ago

Scratch that. User error. Thanks for an awesome plugin!

davatron5000 commented 13 years ago

EDIT: just saw your follow comment. good to hear it got solved :) let us know what you use it on!

TrentWalton commented 13 years ago

Howdy,

I can't be too sure what the conflict is there... It it could be your CSS (try picking apart one of my blog posts...)

Some sample code from a basic implementation I've got going here

body { background: #233a40; color: #adc3c7; font-family:Verdana, sans-serif; }

header { text-align: center; padding: 25% 0; margin-bottom: 100px; width: 75%; margin: 0 auto; background: rgba(255,255,255,.05); }

.fit { color: rgba(0,0,0,.5); display: block; }

Tw

On Jul 31, 2011, at 1:26 AM, zumwalt wrote:

I'm by no means a jQuery expert, but I can't seem to get fittext to work in my current project without $(document).ready(). When I use $(document).ready(), it works with undesired results. For example, if I resize my window in any direction, the targeted text gets rapidly smaller. Any ideas?

FYI, I'm building a responsive/adaptive Wordpress theme based on Roots. I disabled the other jQuery plugins used in Roots by default (Modernizr, Respond) to see if they might be contributing to the issue, but to no avail.

Thanks!

Reply to this email directly or view it on GitHub: https://github.com/davatron5000/FitText.js/issues/5