Sto*_*ace 6 jquery r shiny shinydashboard
我使用Shiny Dashboard。我想包含jQuery在应用程序中。但是,当我添加这些行时
tags$script(src = "https://code.jquery.com/jquery-3.1.1.min.js")
Run Code Online (Sandbox Code Playgroud)
该应用程序完全崩溃。布局混乱,按钮不再可单击,依此类推。我可以jQuery在没有这些问题的情况下将其包含在“正常”的闪亮应用中。
发光仪表板禁止包含jQuery吗?
小智 0
我遇到了类似的问题,解决方案是像这样包含 .css 和 .js 文件dashboardPage()(将它们放入 www/ 目录后):
dashboardPage(
...
body = dashboardBody(
...
shiny::tags$head(
...
tags$link(rel = "stylesheet", href = "jquery-ui.min.css"),
tags$script(src = "jquery-ui.min.js"),
...
),
...
)
Run Code Online (Sandbox Code Playgroud)