Merge pull request #36 from commadelimited/master
Adding example for custom event bindings.
This commit is contained in:
commit
5909c223c6
16
index.html
16
index.html
@ -143,6 +143,18 @@
|
|||||||
</section>
|
</section>
|
||||||
</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>
|
<section>
|
||||||
<h2>Clever Quotes</h2>
|
<h2>Clever Quotes</h2>
|
||||||
<p>
|
<p>
|
||||||
@ -250,6 +262,10 @@
|
|||||||
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
|
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
document.addEventListener('customevent', function(){
|
||||||
|
alert('event has fired');
|
||||||
|
});
|
||||||
|
|
||||||
Reveal.initialize({
|
Reveal.initialize({
|
||||||
// Display controls in the bottom right corner
|
// Display controls in the bottom right corner
|
||||||
controls: true,
|
controls: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user