0

I want to include a Javascript file within my Shiny App to highlight rows of two tables (see code in JSFiddle).

I've searched how to do this and only came across solutions for normal structured Shiny Apps, Dashboards or single-file apps. However, I am using a structure for my app proposed by Dean Attali, where the main UI and server are inside a file called "app.R" and each (sub)menu is within seperate UI and Server files.

My folder structure looks like this:

├── app.R
└── server
   └── someserverfile1.R
   └── someserverfile2.R
└── ui
   └── someuifile1.R
   └── someuifile2.R
└── www
   └── style.css
   └── highlight.js

I tried including the script call

tags$head(tags$script(src="highlight.js"))

in the app.R [here in ui <- tagList() and ui <- tagList(navbarPage())] and in the someuifile1.R, which consists of a tabPanel with a sidebarLayout. In either case, the html-header of the resulting app does not change.

Does anyone have an idea where to put the call?

Martin G.
  • 159
  • 1
  • 15

0 Answers0