on_section | R Documentation |
For a given story_section()
, you may want to trigger an event when the section becomes visible.
This function wraps shiny::observeEvent()
to allow you to modify the state of your map or
invoke other Shiny actions on user scroll.
on_section(map_id, section_id, handler)
map_id |
The ID of your map output |
section_id |
The ID of the section to trigger on, defined in |
handler |
Expression to execute when section becomes visible. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.