f7TapHold {shinyMobile} | R Documentation |
Framework7 tapHold module
Description
Framework7 has a so called "tap hold" event. If tapHold is enabled in f7Page, it triggers after a sustained, complete touch event. f7TapHold is triggered from the server.
Usage
f7TapHold(target, callback, session = shiny::getDefaultReactiveDomain())
Arguments
target |
Element to apply the tapHold event on. Must be a jQuery selector, such as "#id" or ".class", ".class1, .class2", "a"... |
callback |
Javascript callback. |
session |
Shiny session object. |
Examples
library(shiny)
library(shinyMobile)
app <- shinyApp(
ui = f7Page(
title = "Taphold",
f7SingleLayout(
navbar = f7Navbar(title = "f7TapHold"),
f7Button(inputId = "pressme", label = "Press me")
)
),
server = function(input, output, session) {
observe({
f7TapHold(
target = "#pressme",
callback = "app.dialog.alert('Tap hold fired!')"
)
})
}
)
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app
[Package shinyMobile version 2.0.0 Index]