FitText – A Simple jQuery Plugin for Inflating Web Type
How Doest it work
To use this jQuery plugin, just load the following line of codes in the section of your website:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="jquery.fittext.js"></script> <script> jQuery("#responsive_headline").fitText(); </script>
Your text should now fluidly resize, by default: Font-size = 1/10th of the element’s width.
If you feel that your text is resizing very poorly, then you can turn tweak up and down. The default is 1
. See the following codes to understand more about it.
jQuery("#responsive_headline").fitText(1.2); // Turn the compressor up (resizes more aggressively) jQuery("#responsive_headline").fitText(0.8); // Turn the compressor down (resizes less aggressively)
This will hopefully give you a level of “control” that might not be pixel perfect, but resizes smoothly & nicely.