hy-push-state
Version:
Turn static web sites into dynamic web apps
35 lines (29 loc) • 1.25 kB
Markdown
# Examples
When viewing this page on [webcomponents.org][wcorg], the example below will render as an interactive demo. Otherwise, find the standalone examples below.
[wcorg]: https://www.webcomponents.org/element/qwtel/hy-push-state
<!--
```
<custom-element-demo>
<template>
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@1.1.0"></script>
<link rel="import" href="https://unpkg.com/hy-push-state/dist/webcomponent/hy-push-state.html">
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html
<hy-push-state initial-href="https://qwtel.com/hy-push-state/example/simple/" prefetch>
<p>
<a href="./1.html">Page 1</a>
<a href="./2.html">Page 2</a>
<a href="./3.html">Page 3</a>
</p>
<p>Super simple example.</p>
</hy-push-state>
```
When viewing this document on GitHub, npm, or elsewhere, you can check out the standalone examples:
* [WebComponent Example](https://qwtel.com/hy-push-state/example/webcomponent/){:.external}
* [jQuery Example](https://qwtel.com/hy-push-state/example/jquery/){:.external}
* [Vanilla JS Example](https://qwtel.com/hy-push-state/example/vanilla/){:.external}
* [Mixin Example](https://qwtel.com/hy-push-state/example/mixin/){:.external}