Create a gist now

Instantly share code, notes, and snippets.

Phonegap 1.5/Cordova Lazy Load Test
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<script src=""></script>
<script src="js/jquery.js"></script>
<button id="loadPhonegap">Load Phonegap</button>
<button id="checkDevice">Check Device</button>
<button id="callPlugin">Call Plugin</button>
<div id="console">
require.ensure([ "cordova-1.5.0" ], function(req) {
req.ensure([ "plugin1" ], function() {
$("#console").append("Plugin1 loaded<br>");
// Check PhoneGap Device object
$("#checkDevice").click(function() {
// Call PhoneGap Plugin
$("#callPlugin").click(function() {;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment