Auto Resize Text To Fit Its Container - jQuery BigText

File Size: 155 KB
Views Total: 1769
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Auto Resize Text To Fit Its Container - jQuery BigText

Yet another jQuery text resize plugin which automatically adjust the font size of your text to fit its parent container on window resize. So that the text fills the container and there is no free room left. Works both with single line text and multi line text. Perfect for headlines, Slogans, titles, etc.

Basic usage

1. Load the jQuery BigText plugin's script after jQuery library and we're ready to go.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="bigtext.js"></script>

2. Call the plugin on the text container and done.

$('#element').bigtext({
  // options here
});

3. Set the min/max font size on text resize.

$('#element').bigtext({
  minfontsize: 16,
  maxfontsize: 60
});

Change log:

2017-10-03

  • fixed for jQuery 1.9+

 


This awesome jQuery plugin is developed by zachleat. For more Advanced Usages, please check the demo page or visit the official website.