change back state event scope, document level makes more sense as that's where the state class is applied
This commit is contained in:
parent
8dc7ae85a1
commit
0d9a6419bb
@ -255,7 +255,7 @@
|
|||||||
|
|
||||||
// Example of binding an event to a state. This listener will trigger
|
// Example of binding an event to a state. This listener will trigger
|
||||||
// when the slide with 'data-state="blurred"' is opened.
|
// when the slide with 'data-state="blurred"' is opened.
|
||||||
document.querySelector( '#reveal' ).addEventListener( 'blurred', function() {
|
document.addEventListener( 'blurred', function() {
|
||||||
|
|
||||||
}, false );
|
}, false );
|
||||||
|
|
||||||
|
@ -513,8 +513,8 @@ var Reveal = (function(){
|
|||||||
|
|
||||||
// Dispatch custom event
|
// Dispatch custom event
|
||||||
var event = document.createEvent( "HTMLEvents" );
|
var event = document.createEvent( "HTMLEvents" );
|
||||||
event.initEvent( state[i], false, true );
|
event.initEvent( state[i], true, true );
|
||||||
dom.wrapper.dispatchEvent( event );
|
document.dispatchEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up the remaints of the previous state
|
// Clean up the remaints of the previous state
|
||||||
|
Loading…
Reference in New Issue
Block a user