imakewebthings / deck.js

Modern HTML Presentations

Home Page:http://imakewebthings.com/deck.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

event.preventDefault not working for stopping slide propagation

nicohvi opened this issue · comments

I have a weird problem. After downloading the code and running boilerplate.html in Chrome, I added the following code inside the <script> tags at the bottom:

$(function() {
  $.deck('.slide');

  // new code
  $(document).bind('deck.change', function(event, from, to){
    event.preventDefault();
  });
});

However, the deck continues to slide whenever I invoke the 'next' method, what gives?

@Nicolayh Hi, please see #83. This change is in master, but the documentation isn't updated on the project site, since that documentation refers to the "stable" branch and not master. You can either switch to using the stable branch download or switch your event to 'deck.beforeChange'.