jQuery Plugin For Responsive Text with Custom Scale Ratio - Scalem
File Size: | 7.72 KB |
---|---|
Views Total: | 974 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

Scalem is a jQuery plugin for responsive web layout that automatically resizes the text depended on the width of its parent container or a specified element.
How to use it:
1. Include jQuery library and the jQuery scalem plugin in the document.
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <script src="jquery.scalem.js"></script>
2. Call the plugin to make your text responsive using options.
$(document).ready(function() { $('p').scalem({ // Scale ratio (1 = 100%) ratio: .5, // Text will scale relative to this element reference: null, // List of styles to scale styles: '' }); });
3. You can also pass the options via Html5 data-option attributes.
<p data-scale-ratio="1" data-scale-reference=".specified-element"> This text scales with .specified-element element. </p>
Change logs:
2015-12-29
- v1.2.0
2015-02-05
- v1.1.0
2015-01-27
- v1.0.6
2015-01-24
- v1.0.5
This awesome jQuery plugin is developed by thdoan. For more Advanced Usages, please check the demo page or visit the official website.