diff --git a/README.md b/README.md index fb052fe..fa30066 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,18 @@ Amazing layer/modal/dialog system. Wow! + ## Features * Support browsers Chrome 20+, FireFox 20+, Safari 6+, Opera 12+, IE8+ (in progress) * [ES6 syntax](https://github.com/termi/es6-transpiler) * No jQuery (but then need polyfill [Promise](https://gist.github.com/RubaXa/8501359) polyfill) + * More than 90% [test code coverage](http://rubaxa.github.io/Ply/tests/) ## Base usage -Include [ply.css] in `
+ +` +Include [ply.css](ply.css) in `
` (optional) ```html ``` @@ -25,6 +27,40 @@ Ply.dialog("alert", "Wow!").then(function (ui) { ``` +--- + + +## Dialogs + +```js +Ply.dialog({ + "init-state": { + ui: "alert", + data: "Wow!", + next: "other-step" + nextEffect: "3d-flip[180,-180]" + }, + + "other-step": { + ui: "confirm", + data: { + text: "What's next?", + ok: "Exit", // button text + cancel: "Back" + }, + back: "init-state", + backEffect: "3d-flip[-180,180]" + } +}).then(function (ui) { + // ... +}) +``` + + + +--- + + ## Low-level ```js diff --git a/index.html b/index.html index d9ca3e7..013aed6 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,8 @@