From 33ceb747095929a66efccc2a4b10175cad10b681 Mon Sep 17 00:00:00 2001 From: Xavier Seignard Date: Wed, 25 Nov 2015 10:27:19 +0100 Subject: [PATCH] Update README.md - added some syntax highlighting - added the need of Object.assign() polyfill --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34f9be3..bd87d1d 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,14 @@ A version with a global object is also available. ```html ``` -If you have to support all browsers, you need to install the [Promise](https://github.com/jakearchibald/es6-promise) and [Web Animations](https://github.com/web-animations/web-animations-js) polyfills. A version of teleporter bundles everything in one file. +If you have to support all browsers, you need to install the [Promise](https://github.com/jakearchibald/es6-promise), [Web Animations](https://github.com/web-animations/web-animations-js) and [Object.assign()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) polyfills. A version of teleporter bundles everything in one file. ```html ``` ## API ### Basic -``` +```javascript var myElement = new Teleporter('#myid'); myElement.teleport('myclass'); ``` @@ -47,7 +47,7 @@ This will teleport your element from its current state to the state correspondin ### Constructor **'animation'** -``` +```javascript var myElement = new Teleporter({ selector: '#myid', animation: {