Learn R Programming

golem (version 0.1)

activate_js: Interact with JavaScript built-in Functions

Description

activate_js is used in your UI to insert directly the JavaScript functions contained in golem. These functions can be called from the server with invoke_js. invoke_js can also be used to lauch any JS function created inside a Shiny JavaScript handler.

Usage

activate_js()

invoke_js(fun, ui_ref, session = shiny::getDefaultReactiveDomain())

Arguments

fun

JS function to be invoked.

ui_ref

The UI reference to call the JS function on.

session

The shiny session within which to call sendCustomMessage.

show

Show an element with the jQuery selector provided.

hide

Hide an element with the jQuery selector provided.

showid

Show an element with the id provided.

hideid

Hide an element with the id provided.

showclass

Same as showid, but with class.

hideclass

Same as hideid, but with class.

showhref

Same as showid, but with a[href*=

hidehref

Same as hideid, but with a[href*=

clickon

Click on an element. The full jQuery selector has to be used.

disable

Add "disabled" to an element. The full jQuery selector has to be used.

reable

Remove "disabled" from an element. The full jQuery selector has to be used.