jQuery plugin to make text fit it's container.
HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js removing log calls Feb 27, 2017
README.md Launch Aug 8, 2016
index.html Fix documentation Feb 27, 2017

README.md

textfit.js

jQuery plugin to make text fit it's container.

How it works

First I append a div around the inner text. Then, I can compare the ratio between the text width, and the container width. Finally, I use that ratio to set the font size. Easy peazy.

Setup & options

Check out the demo here.