mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added custom trigger button note to readme
no issue - Adds note on how custom trigger button works for theme devs
This commit is contained in:
parent
31f04851e5
commit
4689061d49
1 changed files with 8 additions and 0 deletions
|
@ -13,6 +13,14 @@ Add below script in your theme's `default.hbs` just before the end of body tag O
|
|||
<script type="text/javascript" src="https://unpkg.com/@tryghost/members-js@latest/umd/members.min.js"></script>
|
||||
```
|
||||
|
||||
### Custom trigger button
|
||||
|
||||
By default, the script adds a default floating trigger button on the bottom right of your page which is used to trigger the popup on screen.
|
||||
|
||||
Its possible to override the default trigger button with your own by adding data attribute `data-members-trigger-button` to any HTML tag on page, which will hide the default trigger and allow controlling the popup state by clicking on this element.
|
||||
|
||||
The script also adds custom class names to this element for open and close state of popup - `gh-members-popup-open` and `gh-members-popup-close`, allowing devs to update its UI based on popup state.
|
||||
|
||||
## Basic Setup
|
||||
|
||||
1. Clone this repository:
|
||||
|
|
Loading…
Add table
Reference in a new issue