Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
staa99 committed Dec 3, 2019
2 parents 88862d8 + 70ea4e4 commit a48118e
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ Support partial views in plain HTML with just one line of code
Download the [partials.js](https://github.com/staa99/partials.js/releases/download/v1.0.0/partials.js) or [partials.min.js](https://github.com/staa99/partials.js/releases/download/v1.0.0/partials.min.js) partials.js.min (the minified version) from github directly for the current version (v1.0.0).

#### CDN
Add <script src="https://cdn.jsdelivr.net/gh/staa99/partials.js@1.0.0/partials.min.js"></script>
to your HTML code for the current version (v1.0.0).
Add the following script tag to your HTML code for the current version (v1.0.0).

```html
<script src="https://cdn.jsdelivr.net/gh/staa99/partials.js@1.0.0/partials.min.js"
integrity="sha512-+TluO33Ol2y/d5CnHHCS9gb6FAilwm1uxLFKZs35B0OAftAPMJpBUtxrIMwPfsRrN7A+pg0HR6R5fashqVuT+A=="
crossorigin="anonymous"></script>
```

### Add your partial views
Simply add a <div data-partials="path/to/partial/view"></div> wherever you want to load the view at 'path/to/partial/view' as a partial view.
Simply add a `<div data-partials="path/to/partial/view"></div>` wherever you want to load the view at `'path/to/partial/view'` as a partial view.


## FAQs

### Are there plans to support custom `<partial` elements?
Yes, there are currently plans to support custom `partial` elements.

### Does v1.0.0 support request caching for multiple partials to the same view on the same page?
No, at this time, there's no support for request caching.

0 comments on commit a48118e

Please sign in to comment.