library(htmltools)
library(shinyjs)
#' @export
blueDiv <- function(divText) {
version <- as.character(packageVersion("testPackage5")[[1]])
dep <- htmltools::htmlDependency(
name = "testPackage5",
version = version,
src = c(href = "assets"),
package = "testPackage5",
stylesheet = "testPackageStyles.css",
all_files = FALSE
)
bDiv <- div(divText,dep,class="blue")
}
# useShinyjs()
# jsCode = "$( document ).on(\"shiny:sessioninitialized\",function(event) {
# document.body.style.backgroundColor = \"skyblue\";
# });\r\n
# shinyjs.nu = function(params) {
# $('body').css('background', params);
# }\r\n"
#
# extendShinyjs(text=jsCode, functions = c("nu"))
# includeScript(system.file("js/quizInteractivity.js", package = "testPackage5"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.