Created
October 23, 2014 13:06
-
-
Save bFlood/c1f390def8f1a09c4d94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _views = []; | |
document.addEventListener('deviceready', onDeviceReady, false); | |
function onDeviceReady() { | |
steroids.logger.log("deviceready"); | |
_views.push(createView("next", "next.html")); | |
$("#push").on("click", function() { | |
steroids.layers.push(_views[0]); | |
}); | |
} | |
function createView(id, location){ | |
var view = new steroids.views.WebView(options); | |
view.preload({id: id}, { | |
onSuccess: function() { | |
steroids.logger.log("preloaded view: " + id); //<-----this is called | |
}, | |
onFailure: function() { | |
steroids.logger.log("failed to create view: " + id); | |
} | |
}); | |
return view; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment