Skip to contents

f7TapHold is triggered after long press on an element, 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

if (interactive()) {
library(shiny)
library(shinyMobile)

 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!')"
      )
    })
   }
 )
}