Skip to content

Commit

Permalink
Added readme and license info. Closed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyharris committed May 29, 2012
1 parent 1aefe35 commit ccd01ca
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions README.md
@@ -0,0 +1,63 @@
# SplitLines jQuery Plugin

SplitLines (`$.splitLines()`) is a jQuery plugin that splits new lines of wrapped
text into their own HTML elements, allowing you to animate or operate on each
line individually. Works with nested HTML tags.

## Requirements

- jQuery 1.4.2 or later

## Usage

### HTML

<div id="mytext">
This is an <strong>example</strong> of some long text
that we want to split into lines.
</div>

### Javascript

$('#mytext').splitLines({
tag: 'div',
width: 200,
keepHtml: true
});

### Result

<div id="mytext">
<div>This is an</div>
<div><strong>example</strong> of</div>
<div>some long</div>
<div>text that we</div>
<div>want to split</div>
<div>into lines.</div>
</div>

Now go forth, and animate!

For more demos, take a look at the `demos.html` file in this repo. There are
some animated use cases in there as well.

## License

Copyright (c) 2012 Jeremy Harris

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions jquery.splitlines.js
Expand Up @@ -10,6 +10,7 @@
* the element. Default is true
*
* @param options object The options object
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
(function($){

Expand Down

0 comments on commit ccd01ca

Please sign in to comment.