Following this question, I want to have different styles for different tooltips in my Shiny app. How can I do that?
For example, if I have three buttons, I want to have three different background colors or font color or font style for each of them.
Just repeating the code doesn't work
actionButton("button1", "Click button 1"),
bsTooltip("button1",
"Button 1 Tooltip",
placement = "bottom", trigger = "hover",
options = NULL),
tags$style(HTML("
.tooltip > .tooltip-inner {
width: 1000px;
color: black;
background-color: yellow;
opacity: 1;
}"
))
actionButton("button2", "Click button 2"),
bsTooltip("button2",
"Button 2 Tooltip",
placement = "bottom", trigger = "hover",
options = NULL),
tags$style(HTML("
.tooltip > .tooltip-inner {
width: 600px;
color: white;
background-color: darkblue;
opacity: 1;
}"
))
actionButton("button3", "Click button 3"),
bsTooltip("button3",
"Button 3 Tooltip",
placement = "bottom", trigger = "hover",
options = NULL),
tags$style(HTML("
.tooltip > .tooltip-inner {
width: 1000px;
color: white;
background-color: red;
opacity: 1;
}"
))
What is the solution to this?