Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Mar 6, 2020
1 parent 1c8d21f commit 975c147
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,26 @@ document
});
```

### Active State Detection

You can bind to the `tribute-active-true` or `tribute-active-false` events to detect when the menu is open or closed respectively.

```js
document
.getElementById("myElement")
.addEventListener("tribute-active-true", function(e) {
console.log("Menu opened!");
});
```

```js
document
.getElementById("myElement")
.addEventListener("tribute-active-false", function(e) {
console.log("Menu closed!");
});
```

## Tips

Some useful approaches to common roadblocks when implementing @mentions.
Expand Down

0 comments on commit 975c147

Please sign in to comment.