Fontsize command
Let the user easely change the fontsize of certain elements.
Basic Usage (HTML)
data-jkit="[fontsize:steps=2;affected=p]"
Advanced Init (JavaScript)
$('#myelement').jKit('fontsize', { 'steps': '2', 'affected': 'p' });
Options
Option | Values | Default | Description |
---|---|---|---|
steps | Int | 2 | The steps between each fontsize |
min | Int | 6 | The minimum fontsize |
max | Int | 72 | The maximum fontsize |
affected | DOM element | p | The affected DOM elements |
style | CSS style | font-size | Defines which CSS style should be changed, so you’re not limit to a font size change |
Events
Event | Description |
---|---|
changed | Triggered whenever the fontsize has changed |
Examples
Basic example:
Make it possible to change the fontsize of all paragraphs inside the example div:
Some heading
Some text …
Some more text …
Source:
<input type="button" value="bigger" data-jkit="[fontsize:steps=2;affected=#fs-example p]"> <input type="button" value="smaller" data-jkit="[fontsize:steps=-2;affected=#fs-example p]"> <div id="fs-example"> <h3>Some heading</h3> <p>Some text ...<p> <p>Some more text ...</p> </div>
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]