A jQuery Plugin

Jellyfish Find it on Github

Squishy is a jQuery plugin that automatically resizes text to exactly fit the container with no extra work on your part. You get it to work by linking the script file and including a declaration like the one below in your HTML:

<script type="text/javascript">

You can pass the script a number of options to restrict the squishiness. maxSize is used to set the maximum font size, minSize is used to set the minimum font size, maxWidth sets the maximum width of the line of text, and minWidth, the minimum (all in pixels, for now). These are enclosed in curly braces and passed to the function, like so:

<script type="text/javascript">
    $(".squishy").squishy({maxWidth: 200, minSize: 20});

Much thanks to the guys at Paravel for their work on FitText, on which this script is largely based. This plugin only works for a single line; if you are looking for multiline text fitting, I recommend SlabText.

I shall call him squishy and he shall be mine. And he shall by my squishy.

- Dory