Sha256: 671c84b898a73d08c3dc08aa36d8d73d78cf549b297d4f852dd297d01c277108

Contents?: true

Size: 787 Bytes

Versions: 2

Compression:

Stored size: 787 Bytes

Contents

var store = null;

$(function() {
  $(document).on("dragstart", "img", false);

  $("#page-back").click(function() {
    utils.page(utils.page() - 1);
  });
  $("#page-next").click(function() {
    utils.page(utils.page() + 1);
  });

  $(window).keydown(function(event) {
    if(event.keyCode == 39) {
      event.preventDefault();
      utils.page(utils.page() + 1);
    }
    else if(event.keyCode == 8 || event.keyCode == 37) {
      event.preventDefault();
      utils.page(utils.page() - 1);
    }
  });

  $.getJSON("data.json").done(function(data) {
    if(data.length == 0) alert("No data.json, or data invalid.");

    store = data;

    window.router = new router();
    router.init();
    if(location.hash == "#" || location.hash == "") location.hash = "#index!1";
  });
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mangos-0.0.3 app/js/app.js
mangos-0.0.2 app/js/app.js