observe_class_swap: swap out classes on an html element

Description Usage Arguments Details Value

Description

This function stores the value of the last class to be added (using this function), then removes that class before addding the new class. For example, this may be useful if you want to modify a panel to show an alert.

Usage

1
observe_class_swap(id, expr, env = parent.frame(), quoted = FALSE)

Arguments

id

A character vector to identify the html element to operate on.

expr

An expression that returns a character vector to add to the html element.

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Details

As this is an observer, there is no return value. It is called for the side-effect of changing the class of the html element.

This is based on shiny::renderText()

Value

nothing


ijlyttle/shinypod documentation built on May 18, 2019, 3:41 a.m.