D8 - Show popup on click event - SPB tutorial

Last updated on
20 May 2019

1. Install Simple popup blocks Drupal 8 module.

2. Go to admin > media > config > Add simple popup blocks

3. Choose the identifier, i.e, Drupal blocks or custom css selector and choose/provide correct values.

4. Choose the popup position.

5. Give visit counts, so the popup will trigger on particular page visits only.

Example values:
0 = Show popup on users each visit's click
1,2 = Show popup on users first and second visit's click
1,4,7 = Show popup on users first, forth and seventh visit's click

6. Set the trigger method as Manual - on click event

7. Provide source css selector. That is css selector which a user is going to click.

Example values: #my-profile, #custom_div_cls, .someclass, .mypopup-class.

8. Set Overlay, Minimize button, Close button, ESC key to close based on your requirement.

9. Finally, click Convert to popup.

9. Go to your popup page and click the on click css selector. Now it will trigger the popup.

Help improve this page

Page status: No known problems

You can: