Minimalist jQuery Responsive Font Size Plugin - jFont

File Size: 5.2 KB
Views Total: 906
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Minimalist jQuery Responsive Font Size Plugin - jFont

jFont is an extremely lightweight jQuery plugin that automatically enlarges & shrinks the font size of your text accordion to the screen size. Useful for responsive web layout where you wish to make the text as large as possible to fill its parent container. When you resize the window, the text will be automatically scaled based on the jQuery window resize event.

How to use it:

1. Load the jQuery library and the jQuery jFont plugin at the end of the document.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="src/jFont.js"></script>

2. Call the .jFont() function on the body tag or a specified container where you wish to make the text flexible and responsive.

// jFont(minimum size, maximum size, middle size);
$('body').jFont(20, 60, 40); // in pixels

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