Created
July 2, 2012 08:05
-
-
Save filmaj/3031791 to your computer and use it in GitHub Desktop.
global scope hurray
This file contains 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
<html> | |
<head> | |
<script type="text/javascript" src="phonegap.js"></script> | |
<script type="text/javascript" src="mysqliteplugin.js"></script> | |
<script type="text/javascript"> | |
var db; // this is now globally-scoped | |
document.addEventListener('deviceready', function() { | |
db = new sqliteplugin(); // assigns to the db variable above | |
}); | |
</script> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment