Skip to content

Commit

Permalink
Added usage and customization to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bjester committed May 18, 2014
1 parent 8b3b6a8 commit 03b7c9d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,34 @@ $ npm install
$ grunt build
$ cd build/
```

## Usage

### Translate
```js
$('#FancyElement').transition(
{
translate: [2, 20, -1] // performs translate3d if capable
},
{
easing: 'ease', // whatever the css transition-timing-function accepts
duration: 1000, // one sec (its in millisecond)
},
function()
{
// All done
console.log($(this)); // #FancyElement
});
```

### Opacity
```js
$('#FancyElement').transition(
{
opacity: 0.1 // no JS stepping here, native CSS transition
});
```

## Customization
Take a look at the Opacity handler for how to build your own, to support any CSS property you want
transitioned (if supported by browser).

0 comments on commit 03b7c9d

Please sign in to comment.