Skip to content
Snippets Groups Projects
Commit 2caac75c authored by andy matthews's avatar andy matthews
Browse files

Adding example for custom event binding.

parent 0acae19d
No related branches found
No related tags found
No related merge requests found
......@@ -143,6 +143,18 @@
</section>
</section>
<section data-state="customevent">
<h2>Custom Events</h2>
<p>
Additionally custom events can be triggered on a per slide basis by binding to the <code>data-state</code> name.
</p>
<p><code style="font-size: 27px;">
document.addEventListener('customevent', function(){<br />
alert('event has fired');<br />
});
</code></p>
</section>
<section>
<h2>Clever Quotes</h2>
<p>
......@@ -250,6 +262,10 @@
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
document.addEventListener('customevent', function(){
alert('event has fired');
});
Reveal.initialize({
// Display controls in the bottom right corner
controls: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment