Skip to content

@dhavaln /index.html
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Phonegap 1.5/Cordova Lazy Load Test
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="https://raw.github.com/jbrantly/yabble/master/lib/yabble.js"></script>
<script src="js/jquery.js"></script>
</head>
<body>
<button id="loadPhonegap">Load Phonegap</button>
<button id="checkDevice">Check Device</button>
<button id="callPlugin">Call Plugin</button>
<div id="console">
</div>
<script>
require.setModuleRoot("js");
require.useScriptTags();
$("#loadPhonegap").click(function(){
require.ensure([ "cordova-1.5.0" ], function(req) {
req.ensure([ "plugin1" ], function() {
$("#console").append("Plugin1 loaded<br>");
});
});
});
// Check PhoneGap Device object
$("#checkDevice").click(function() {
console.log(JSON.stringify(device));
});
// Call PhoneGap Plugin
$("#callPlugin").click(function() {
window.plugins.plugin1.call();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.