davatron5000 / FitText.js

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

Add callback function with containers height as a value #20

Closed PaulAdamDavis closed 10 years ago

PaulAdamDavis commented 12 years ago

I'm using this plugin in a complex layout that needs a fixed height container. The height of the container changes needs to change as the text iside resizes (via this plugin). It would be awesome if there was a callback that passed the height of the text container to it, so I can set a new height to my other container each time the text is resized.

jameslouiz commented 11 years ago

You can do this yourself with the window resize event

$(window).resize(function(){ var height = $('div').height(); });