TextResizer 1.0

TextResizer is an easy to setup plugin... The goal of this script is to provide quick Text Resizing options.



Details

Author
Nickolas Simard
Current version
1.0
GitHub
NickoLabs/TextResizer
Downloads
2092
Category
Interface
Tags
Report
GitHub Issues

Releases


Dependencies

  • core/1.2.4: *

How to use

For an element to be recognized by the script, it has to contain the CSS class: "text-resize-me". Example:

HTML

Lorem ipsum dolor sit amet, consectetur adipiscing elit.


Installation

Simply add the script to your page, and use:

Javascript

window.addEvent('domready',function(){  
    var text_resizer = new TextResizer();
});

Options

There are few options that can be specified. The container for the tool can either be a div of your own choice or, by default, the document body itself. You can also specify the sizes available.

Javascript

var text_resizer = new TextResizer({
    container: 'text_resizer_holder',
    sizes: $H({normal: "15px",
        big: "22px"})
});

The goal I want to achieve (and it will be down in future development) is to be able to set size specifically to a resizable element. For exemple, be able to set a normal size state that would set the font-size to X pixel and Y pixel to this other elements.


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus