Reads a JS callback function into rintrojs

readCallback(funname = c("switchTabs"))

Arguments

funname

The name of the function you want to use. Options include:

switchTabs

This function is intended to be passed to IntroJs's onbeforechange method. It will switch the currently active tab in your Shiny app to be the one containing the next element in your tour (this function is called by IntroJs right before it moves to the next element). Try running shiny::runApp(system.file("examples/switchTabs.R", package = "rintrojs")) to see an example.

Value

A string containing the body of a callback function

Examples

if (FALSE) {
introjs(session, events = list(onbeforechange = readCallback("switchTabs")))
}