Update README with vanilla and alpine JS.
This commit is contained in:
parent
63d91ff5e0
commit
72266f462e
1 changed files with 16 additions and 0 deletions
16
README.md
16
README.md
|
|
@ -700,8 +700,24 @@ Includes tracking code for Matomo or Google in a way that supports Content secur
|
|||
|
||||
To add AlpineJS, jQuery or Umbrella JS, set the related parameter to true in the configuration file or in the front matter of specific pages. No problem having them loaded on the same page.
|
||||
|
||||
Personally I use vanilla JS nowadays and I'm playing around with AlpineJS.
|
||||
|
||||
This is the way I construct my JavaScript files.
|
||||
|
||||
**Vanilla JS:**
|
||||
|
||||
```js
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Add a js class to the html-tag when JavsScript is active.
|
||||
document.querySelector('html').classList.replace('nojs', 'js');
|
||||
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
**Umbrella JS:**
|
||||
|
||||
```js
|
||||
|
|
|
|||
Loading…
Reference in a new issue