Skip to content

Instantly share code, notes, and snippets.

@gadenbuie
Created March 4, 2020 14:24
Show Gist options
  • Save gadenbuie/c559773386dc5345308c87c17a15d010 to your computer and use it in GitHub Desktop.
Save gadenbuie/c559773386dc5345308c87c17a15d010 to your computer and use it in GitHub Desktop.
---
title: Move <script> outside markdown area
output:
xaringan::moon_reader:
seal: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=TRUE)
```
<script>
alert('hello world!');
</script>
```{js}
alert('hello world again!')
```
```html
<script>
alert("don't move me, i'm not actually JS code")
</script>
```
---
One time only...
<script>alert('you should see this one time only')</script>
--
There it went.
---
<script>setTimeout(() => alert('delayed hello'), 5000)</script>
````markdown
```html
<script>
alert("don't move me either");
</script>
```
````
# https://git.io/JvaxY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment