Last active
April 15, 2017 22:18
-
-
Save NickTomlin/7813bcfb626ec9088377 to your computer and use it in GitHub Desktop.
Step through reveal.js code as fragments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// stolen from http://stackoverflow.com/a/25396283 | |
// add this in the "callback" block of the highlight plugin definition | |
// https://github.com/hakimel/reveal.js/blob/master/index.html#L399 | |
[].forEach.call( document.querySelectorAll( '.highlight' ), function( v, i ) { | |
hljs.highlightBlock(v); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre class="highlight"> | |
<span class="highlight fragment" data-fragment-index="1">function () {</span> | |
<span class="highlight fragment" data-fragment-index="2">var self = this;</span> | |
<span class="highlight fragment" data-fragment-index="3"> | |
function getForEvents () { | |
<span class="highlight featured-code">return Object.keys(_events).map(function (e) {</span> | |
return e; | |
}); | |
} | |
</span> | |
<span class="highlight highlight-block fragment" data-fragment-index="1">}</span> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment