Browse Source

Change default event

Samy Pessé 10 years ago
parent
commit
d295a55fee
1 changed files with 8 additions and 2 deletions
  1. 8 2
      book/test.js

+ 8 - 2
book/test.js

@@ -1,3 +1,9 @@
-$(document).ready(function() {
-    alert("Hello World");
+$(document).bind("bookReady", function() {
+    gitbook.bind("page.change", function() {
+        // do something
+    });
+
+    gitbook.bind("exercise.submit", function() {
+        // do something
+    });
 });