reveal.js
reveal.js copied to clipboard
Q: Simultaneous animation of two code blocks
Is there a way to have the animation in two code blocks advance in lockstep? e.g. (replacing inner backtick with -)
---lean [1|2]
#check 1
#check "Hi"
---
---lean [1|2]
Nat
String
---
In the first frame, the two line 1's will be highlighted. In the second frame, the two line 2's will be highlighted.
With JavaScript you can manually change fragment indexes and they'll run in parallel. Code snippet fragment indexes are automatically created, and I'm not sure if that can be changed declaratively. I hope there's a way, but I don't think so. So I've changed it with JavaScript in my slides and it's working. I actually made it a little more generic so I can reassign fragment ids in any slide with an html comment providing a simple map.