summaryrefslogtreecommitdiff
path: root/doc/development/fe_guide/droplab/droplab.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/fe_guide/droplab/droplab.md')
-rw-r--r--doc/development/fe_guide/droplab/droplab.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/development/fe_guide/droplab/droplab.md b/doc/development/fe_guide/droplab/droplab.md
index 4d7c882dc09..83bc4216403 100644
--- a/doc/development/fe_guide/droplab/droplab.md
+++ b/doc/development/fe_guide/droplab/droplab.md
@@ -26,7 +26,7 @@ If you do not provide any arguments, it will globally query and instantiate all
<ul>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init();
```
@@ -47,7 +47,7 @@ You can add static list items.
<ul>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init();
```
@@ -65,7 +65,7 @@ a non-global instance of DropLab using the `DropLab.prototype.init` method.
<ul>
```
-```js
+```javascript
const trigger = document.getElementById('trigger');
const list = document.getElementById('list');
@@ -83,7 +83,7 @@ You can also add hooks to an existing DropLab instance using `DropLab.prototype.
<ul id="list" data-dropdown><!-- ... --><ul>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init();
@@ -114,7 +114,7 @@ for all `data-dynamic` dropdown lists tracked by that DropLab instance.
</ul>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init().addData([{
@@ -137,7 +137,7 @@ the data as the second argument and the `id` of the trigger element as the first
</ul>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init().addData('trigger', [{
@@ -167,7 +167,7 @@ dropdown lists, one of which is dynamic.
</div>
```
-```js
+```javascript
const droplab = new DropLab();
droplab.init().addData('trigger', [{
@@ -224,7 +224,7 @@ Some plugins require configuration values, the config object can be passed as th
<ul id="list" data-dropdown><!-- ... --><ul>
```
-```js
+```javascript
const droplab = new DropLab();
const trigger = document.getElementById('trigger');
@@ -249,7 +249,7 @@ droplab.init(trigger, list, [droplabAjax], {
When plugins are initialised for a droplab trigger+dropdown, DropLab will
call the plugins `init` function, so this must be implemented in the plugin.
-```js
+```javascript
class MyPlugin {
static init() {
this.someProp = 'someProp';