change back state event scope, document level makes more sense as that's where the...
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 31 Mar 2012 03:59:19 +0000 (23:59 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 31 Mar 2012 03:59:19 +0000 (23:59 -0400)
index.html
js/reveal.js

index 327236c8b2d60663b59b0049618059a50d9cff7f..e67b3e8fbbb5e181918860998ff15e90f00637d0 100644 (file)
 
                        // 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 );
 
index e35b8de89f6cc1cdac20da7a29dbcfabf86f4d11..0fb4c6102f08d53033d4801f6762da69edf9fd8a 100644 (file)
@@ -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