Skip to content

Commit

Permalink
Merge pull request #90 from adobe-webplatform/version-2.0.0
Browse files Browse the repository at this point in the history
Version 2.0.0
  • Loading branch information
redmunds authored Jul 5, 2016
2 parents 19047f8 + 21517f6 commit 8ac8b50
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Here is a simple Balance Text setup:

See the demo provided or [this online version for a working sample](http://adobe-webplatform.github.io/balance-text/demo/index.html).

Balance Text will *automatically* run on any elements with <code>.balance-text</code> class:
Balance Text will *automatically* run on any elements with <code>balance-text</code> class:

- when the page loads (DOM Ready event)
- when it is resized
Expand All @@ -46,11 +46,18 @@ If you need to manually re-balance all triggered elements, use:
$.balanceTextUpdate();
```

To Balance Text and have it automatically update on resize, use:

```
$.balanceText('.my-class');
```


## Use from a CDN

[//cdnjs.cloudflare.com/ajax/libs/balance-text/1.6.0/jquery.balancetext.min.js](//cdnjs.cloudflare.com/ajax/libs/balance-text/1.6.0/jquery.balancetext.min.js)
[//cdnjs.cloudflare.com/ajax/libs/balance-text/2.0.0/jquery.balancetext.min.js](//cdnjs.cloudflare.com/ajax/libs/balance-text/2.0.0/jquery.balancetext.min.js)

[//cdn.jsdelivr.net/jquery.balancetext/1.6.0/jquery.balancetext.min.js](//cdn.jsdelivr.net/jquery.balancetext/1.6.0/jquery.balancetext.min.js)
[//cdn.jsdelivr.net/jquery.balancetext/2.0.0/jquery.balancetext.min.js](//cdn.jsdelivr.net/jquery.balancetext/2.0.0/jquery.balancetext.min.js)

## Requirements
BalanceText is designed to run in most common browsers and implemented as a jQuery plugin. This means that the standard jQuery library is required for it to work. This plugin was last updated using jQuery 1.9.1, but it should work with all newer (and some older) versions of jQuery.
Expand All @@ -68,3 +75,4 @@ Code is minified using: http://marijnhaverbeke.nl/uglifyjs
* v 1.5.0 - Re-balance text on resize for manually triggered selectors (rileyjshaw)
* v 1.6.x - Add balanceTextUpdate() method (rileyjshaw), bug fixes (bfred-it)
* v 1.7.0 - Hack for partially working with jQuery 3, remove deprecation warning
* v 2.0.0 - Fix automatic updating of custom selectors for jQuery 3 (bfred-it)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "balance-text",
"version": "1.7.0",
"version": "2.0.0",
"authors": [
"Adobe Systems, Inc. <https://github.com/adobe-webplatform>"
],
Expand Down
2 changes: 1 addition & 1 deletion jquery.balancetext.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "balance-text",
"version": "1.7.0",
"version": "2.0.0",
"filename": "jquery.balancetext.min.js",
"homepage": "https://github.com/adobe-webplatform/balance-text",
"description": "A jQuery plugin for implementing balancing of text across lines in a web page",
Expand Down

0 comments on commit 8ac8b50

Please sign in to comment.