Lightweight jQuery Responsive Text Plugin

File Size: 6.18KB
Views Total: 429
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Lightweight jQuery Responsive Text Plugin

Responsive Text is a minimalist jQuery plugin designed for responsive web layout that automatically adjusts the font size of your text based on the viewport size of your page.

You might also like:

How to use it:

1. Load the jQuery Responsive Text plugin at the end of you document, but after jQuery javascript library.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="src/js/jquery.responsive-text.js"></script>

2. Create a container for your responsive text.

<div class="demo">I'M RESPONSIVE</div>

3. Call the plugin on this container.

<script>
$(document).ready(function() {
$(".demo").responsiveText({
fontSize: '5vw', // CSS3 viewport units
minFontSize: '10px', // the minimum font size
maxFontSize: '64px', // the maximum font size
bindResize: true // whether to perform layout on window resize or not
});
});
</script>

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