Advertisement
Guest User

firstRun.js

a guest
Apr 17th, 2017
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.72 KB | None
  1. window.fn = {};
  2. ons.ready(function(){
  3. window.fn.open = function() {
  4.   var menu = document.getElementById('splitter-menu');
  5.   menu.open();
  6. };
  7.  
  8. window.fn.load = function(page, then, options) {
  9.   var content = document.getElementById('navi');
  10.   var menu = document.getElementById('splitter-menu');
  11.   content.pushPage(page, options)
  12.     .then(function(){ menu.close.bind(menu); then;});
  13. };
  14.  
  15.  
  16. window.fn.pop = function() {
  17.   var content = document.getElementById('navi');
  18.   content.popPage();
  19. }
  20.  
  21. window.fn.reset = function(page, data){
  22.   var content = document.getElementById('navi');
  23.   var menu = document.getElementById('spliter-menu');
  24.   content.resetToPage(page, data)
  25.     .then(menu.close.bind(menu));
  26. }
  27. });
Advertisement
RAW Paste Data Copied
Advertisement