I would like to trigger an event when the user leaves a selectize-Input. However for selectizeInput it does not work and for textInput it only fires once:
library(shiny)
ui <- fluidPage(
selectizeInput("si", label="letters", choices = letters),
tags$script(HTML(
'
$("#si").on("blur", function() {
console.log("boawigjawegaosdgi");
})
'
)),
textInput("ti", label = "ti"),
tags$script(HTML(
'
$("#ti").on("blur", function() {
console.log("boawisdgi");
})
'
)),
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
What could I change so it works?