app/js/app.js in storys-0.0.2 vs app/js/app.js in storys-0.0.3
- old
+ new
@@ -3,23 +3,34 @@
$(function() {
$(document).on("dragstart", "a, img", false);
$("#wrapper").twoup("none");
- $("#page-back").click(function() {
+
+ $(document).click(function() {
+ $("body").toggleClass("pagination-active");
+ });
+
+ $("#page-back").click(function(e) {
+ e.stopPropagation();
$.twoup.page(-1, true);
});
- $("#page-next").click(function() {
+ $("#page-back-10").click(function(e) {
+ e.stopPropagation();
+ $.twoup.page(-10, true);
+ });
+ $("#page-next").click(function(e) {
+ e.stopPropagation();
$.twoup.page(1, true);
});
-/*
- $("#wrapper > div > div").hammer().on("drag swipeleft swiperight", function(event) {
- if(Hammer.utils.isVertical(event.gesture.direction)) return;
- event.gesture.preventDefault();
-
- if(event.type == 'swipeleft') $.twoup.page(1, true);
- else if(event.type == 'swiperight') $.twoup.page(-1, true);
- });*/
+ $("#page-next-10").click(function(e) {
+ e.stopPropagation();
+ $.twoup.page(10, true);
+ });
+ $("#page-home").click(function(e) {
+ e.stopPropagation();
+ location.hash = lastControllerLocation;
+ });
$.getJSON("data.json").done(function(data) {
if(data.length == 0) alert("No data.json, or data invalid.");
store = data;