Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions module/AOU_ethics.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ These ethics-related questions can be added on to any activity that leverages th
- [Google Doc](https://docs.google.com/document/d/1Xi1M9icJUJ2pfxp5pOV4yzQUHfQCM8zo/edit?usp=sharing&ouid=116032995747974603894&rtpof=true&sd=true)

- Answer key available [here](https://docs.google.com/document/d/16GiVCWKhVxkKzOUr6XlQ_vdj-tyxBYlIa3lmstzf38Y/edit?usp=sharing). Please message Ava Hoffman (ahoffma2 at fredhutch dot org) to get access.

```{r}
#| echo: false
tt <- function(x, y) {
paste0('<a href="#" data-toggle="tooltip" title="',y,'">',x,'</a>')
}
```

<div class="tooltip">Hover over me
<span class="tooltiptext">SECRET TIP</span>
</div>
45 changes: 45 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,49 @@
background-color: RoyalBlue;
}

/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}

/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;

/* Position the tooltip text */
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;

/* Fade in tooltip */
opacity: 0;
transition: opacity 0.3s;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}