|
Project Information
Members
Featured
Downloads
|
jQDynamicFontSize adjust the font-size dynamically to make a headline or content fit into a given number of lines. In a production system, use jquery-dynamicfontsize.min.js. For debugging or developing, use jquery.dynamicfontsize.js. Include a reference to the script after loading jQuery: <script src="jquery.dynamicfontsize.min.js"></script> Usage: $("#idOfElement").dynamicFontSize();This will attempt to scale the font size of the element down with 10% in 3 iterations, stopping when a value has been found that allows the element to only use one text line. $("h1").dynamicFontSize();This will attempt to scale all h1 elements. Options supported:
This plugin was initially developed by Gamer.no for use to dynamically scale their headlines to avoid line breaking. |