Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update intro.md #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The `vex.combined.min.js` file includes:

One of the simplest ways to use vex is to call `vex.dialog.alert`, `vex.dialog.confirm`, or `vex.dialog.prompt`. In this demo, we're using `vex.dialog.confirm` to ask the user to confirm the answer to a simple question.

```html
<a class="demo-confirm hs-brand-button">Destroy the planet</a>
<div class="demo-result-confirm hs-doc-callout hs-doc-callout-info" style="display: none"></div>
<script>
Expand All @@ -82,6 +83,7 @@ $('.demo-confirm').click(function(){
});
});
</script>
```

Play with this demo:

Expand All @@ -102,6 +104,7 @@ vex.dialog.confirm({

Here's a more complex demo in which we use `vex.dialog.open` (a more generic method that `alert`, `confirm`, and `prompt` all call internally) to build a login dialog.

```html
<a class="demo-login hs-brand-button">Log in</a>
<div class="demo-result-login hs-doc-callout hs-doc-callout-info" style="display: none"></div>
<script>
Expand All @@ -128,6 +131,7 @@ Here's a more complex demo in which we use `vex.dialog.open` (a more generic met
});
});
</script>
```

Play with this example:

Expand Down Expand Up @@ -164,7 +168,7 @@ To learn more about how to use vex, visit our API pages.

vex was built by [Adam Schwartz](http://twitter.com/adamfschwartz)


```html
<!-- Resources for the demos -->
<p style="-webkit-transform: translateZ(0)"></p>
<script src="/vex/dist/js/vex.combined.js"></script>
Expand All @@ -175,3 +179,4 @@ vex was built by [Adam Schwartz](http://twitter.com/adamfschwartz)
vex.defaultOptions.className = 'vex-theme-os';
})();
</script>
```