Skip to content

Commit c8de3f2

Browse files
author
Tom Doan
committed
Update to v1.2.0
1 parent 065fcfe commit c8de3f2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Scalem JS
22

3-
Scalem, short for __scale elements__ or slang for __scale 'em__, is a light-weight responsive text jQuery plugin inspired by [FlowType](http://simplefocus.com/flowtype/). Use it to "liquify" elements on your website so that they scale relative to the width of their parent element or, optionally, any element you specify (see Options below). Scalem is not just limited to text size—it can be used to scale any CSS style that takes a numeric unit such as px, em, or %.
3+
Scalem, short for __scale elements__ or slang for __scale 'em__, is a light-weight responsive text jQuery plugin inspired by [FlowType](http://simplefocus.com/flowtype/). Use it to "liquify" elements on your website so that they scale relative to the width of their parent element or, optionally, any element you specify (see Options below). Scalem is not just limited to text size—it can be used to scale any CSS style that takes a numeric unit such as `px`, `em`, or `%`.
44

55
### [See a demo »](http://thdoan.github.io/scalem/demo.html)
66

77
## Options
88

9-
Options can be passed via data attributes or JavaScript (see Usage below). For data attributes, append the option name after "data-scale-", for example `data-scale-ratio="1"`.
9+
Options can be passed via data attributes or JavaScript (see Usage below). For data attributes, append the option name after "data-scale-", for example `data-scale-ratio="0.5"`.
1010

1111
Name | Type | Default | Description
1212
----------- | ------ | ------- | -----------
13-
`ratio` | number | 0.5 | Scale ratio, where 1 scales the element to 100% the width of the reference element.
13+
`ratio` | number | 1 | Scale ratio, where 1 scales the element to 100% the width of the reference element.
1414
`reference` | string | parent | Selector to the reference element (text will scale relative to this element's width).
15-
`styles` | string | '' | Space-separated list of CSS properties to scale in addition to font-size.
15+
`styles` | string | '' | Space-separated list of CSS properties to scale in addition to `font-size`.
1616

1717

1818
## Usage
1919

2020
```html
2121
<body>
2222
<h1>Scalable Heading</h1>
23-
<p id="txt" data-scale-ratio=".25">
23+
<p id="txt" data-scale-ratio="0.25">
2424
Scalable Text
2525
<p>
2626
<p>
@@ -33,10 +33,10 @@ $(document).ready(function() {
3333
$('h1').scalem();
3434
// Scale text to 25% of the document's width using data attribute
3535
$('#txt').scalem();
36-
// Scale button to 100% the width of the <h1>, while also keeping its
36+
// Scale button to 50% the width of the <h1>, while also keeping its
3737
// border ratio and width proportionate, by passing object properties
3838
$('.btn').scalem({
39-
ratio: 1,
39+
ratio: 0.5,
4040
reference: 'h1',
4141
styles: 'border-radius border-width'
4242
});

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "scalem",
33
"description": "A lightweight jQuery plugin to make any element scalable (responsive).",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"main": "dist/jquery.scalem.js",
66
"license": "MIT",
77
"ignore": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scalem",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "A lightweight jQuery plugin to make any element scalable (responsive).",
55
"keywords": [
66
"jquery-plugin",

0 commit comments

Comments
 (0)