Hello,
I'm trying to build a flexdashboard document with a help link in the navbar that triggers a modal.
For the modal I'm using the package bsplus and it works great if I put a button in the dashboard.
I would like to trigger the opening of the modal with an icon in the navbar, for exemple with a onclick argument but it is not handled by flex_dashboard
For that I try to use an javascript function that would be
It works great if I run it in the javascript console in google chrome developper tool, after the dashboard is loaded but I can't make it work using <script> or tags$script inside the dashboard body
Here is what I tried:
using
bs_modal(
id = "modal_markdown",
title = "Using Markdown",
body = includeMarkdown(system.file("markdown", "modal.md", package = "bsplus"))
)
1st tab
bs_button("Click for modal", button_type = "primary") %>% bs_attach_modal("modal_markdown")
Hello, I'm trying to build a flexdashboard document with a help link in the navbar that triggers a modal. For the modal I'm using the package bsplus and it works great if I put a button in the dashboard. I would like to trigger the opening of the modal with an icon in the navbar, for exemple with a onclick argument but it is not handled by flex_dashboard
For that I try to use an javascript function that would be
$( "#navbar a" ).click(function() { $("#modal_markdown").modal(); });
It works great if I run it in the javascript console in google chrome developper tool, after the dashboard is loaded but I can't make it work using
<script>
ortags$script
inside the dashboard bodyHere is what I tried:
1st tab