jQuery Plugin For Flexible Html Elements - FitText Extended
| File Size: | 125 KB |
|---|---|
| Views Total: | 772 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
A jQuery plugin extends the jQuery FitText for fluidly scaling text, inputs, selects, margin, padding to adapt your website for any screen size.
Basic Usage:
1. Include the jQuery javascript library and jQuery FitText Extended plugin on the web page.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="fitText.e.js"></script>
2. Make an Html element flexible and set the scale options in a Javascript object.
var fitTextObject = {
min: 1, //As long as your font size isn't over 9000!!!
max: 9001,
//This is if you want to keep the margin and padding the same.
/*
d = default which means this wont be a drawcall.
The compressor applies
*/
padding: 0,
margin: 0,
/*
window: scale to window - default
parent: scale to parent.
selector: choose a custom selector to scale to.
*/
scaleTo: 'window'
}
$('myElement').fitText(1,fitTextObject);
This awesome jQuery plugin is developed by Chris-Cates. For more Advanced Usages, please check the demo page or visit the official website.











