Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change back state event scope, document level makes more sense as tha…

…t's where the state class is applied
  • Loading branch information...
commit 0d9a6419bb415524d36fb7870cb6949c8d35a8b7 1 parent 8dc7ae8
@hakimel authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  index.html
  2. +2 −2 js/reveal.js
View
2  index.html
@@ -255,7 +255,7 @@ <h3 class="inverted">BY Hakim El Hattab / hakim.se</h3>
// Example of binding an event to a state. This listener will trigger
// when the slide with 'data-state="blurred"' is opened.
- document.querySelector( '#reveal' ).addEventListener( 'blurred', function() {
+ document.addEventListener( 'blurred', function() {
}, false );
View
4 js/reveal.js
@@ -513,8 +513,8 @@ var Reveal = (function(){
// Dispatch custom event
var event = document.createEvent( "HTMLEvents" );
- event.initEvent( state[i], false, true );
- dom.wrapper.dispatchEvent( event );
+ event.initEvent( state[i], true, true );
+ document.dispatchEvent( event );
}
// Clean up the remaints of the previous state
Please sign in to comment.
Something went wrong with that request. Please try again.