/* * Part of Nitriques Solutions inc. (http://www.nitriques.com) jQuery plug-in bundle * * Use this plugin to dynamically modifies target elements' font-size. Compatible with * jQuery Cookie plugin to save the user preferences * * Usage $('.buttons').ntr$fontSize(opts); * * Examples: * * 1- Default: toggle between 1, 1.1, 1.2, 1.3, 1.4, 0.8, 0.9 (80% to 140%) the original font size * on <p> * $('#plustext').ntr$fontSize(); * * 2- With options: toggle with default sizes on selected <p> only * $('#plustext').ntr$fontSize({ * elements: p:not(.fixed-font-size) * }); * * 3- With options: toggle all <p> only between 100% to 60% * $('#plustext').ntr$fontSize({ * size: [1, 0.9, 0.8, 0.7, 0.6] * * OR * * size: function () { * var x, a = []; * for (x=1; x<=0.6; x-=0.1) { * a.push(x); * } * return a * } * * }); * * Liscence under the The Code Project Open License (CPOL) * http://www.codeproject.com/info/cpol10.aspx * Name: jquery.fontsize.js * Date: 2011-06-16 * Version: 1.0 * Pre-requisites: none; * Optionally: jquery.cookie.js * * Version 1.0 * Initial version */
Solutions-Nitriques/jQuery-fontSize
Use this plugin to dynamically modifies target elements' font-size
JavaScript