Download
User Rating: 0/5 ( 0 votes)
Squishy is a jQuery plugin that automatically resizes text to exactly fit the container with no extra work on your part.
Plugin options:
-
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.
-
minWidth sets the maximum width of the line of text.
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">
$(".squishy").squishy();
</script>
You can pass the script a number of options to restrict thesquishiness. 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});
</script>