Html Use

Best Html, Css, jquery tutorials, Best jquery plugins, cool effects with jquery examples, demo, demos for beginners, designers, developers. jQuery Plugin Tutorial with example. On www.htmluse.com

Saturday, 26 July 2014

fontFlex – jQuery Plugin for Responsive Font Sizes

Download   Demo


jQuery.fontFlex


Lightweight jQuery extension for dynamically changing font sizes according to screen / browser width. Intended to be used with responsive or adaptive CSS layouts.


Installation


Include the latest version of jQuery and jQuery.fontFlex.js in the <head> of your HTML document:



<script src="jQuery.min.js"></script> 
<script src="jQuery.fontFlex.js"></script>


How to Use


Define a default CSS font base by setting font-size: 1em and line-height: 150% on the body or intended element. Declaring the font-size is optional, but highly recommended in case javascript is disabled. Finally, call the plugin on said element.


Syntax Example



$(function() 

// All elements
$('body').fontFlex(14, 20, 70);

// H1 only
$('h1').fontFlex(24, 36, 70);

);


Custom Parameters
min Minimum font-size in pixels
max Maximum font-size in pixels
mid Mid-range buffer. Values ranging from 60 to 70 produce the best results. Lower values produce a larger initial font-size, while higher values produce the opposite. Adjust accordingly to fit your requirements.



fontFlex – jQuery Plugin for Responsive Font Sizes
Unknown at Saturday, July 26, 2014
Share

No comments:

Post a Comment

‹
›
Home
View web version

About Me

Unknown
View my complete profile
Powered by Blogger.