Skip to content

Commit

Permalink
change back state event scope, document level makes more sense as tha…
Browse files Browse the repository at this point in the history
…t's where the state class is applied
  • Loading branch information
hakimel committed Mar 31, 2012
1 parent 8dc7ae8 commit 0d9a641
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
4 changes: 2 additions & 2 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d9a641

Please sign in to comment.