Ich habe ein neues Projekt mit der PhoneGap-Startervorlage in Visual Studio eingerichtet. Die Vorlage funktioniert wie erwartet, aber wenn ich versuche, jquery mobile zur Seite hinzuzufügen und eine Funktion von ihr aufzurufen, wird gemeldet, dass jQuery nicht definiert ist.PhoneGap & Visual Studio kopiert keine Skriptdatei
hier ist meine Vorlage javascript:
<script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script>
<script type="text/javascript" src="jquery.mobile.min.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready",onDeviceReady,false);
// once the device ready event fires, you can safely do your thing! -jm
function onDeviceReady()
{
document.getElementById("welcomeMsg").innerHTML += "Cordova is ready! version=" + window.device.cordova;
console.log("onDeviceReady. You should see this message in Visual Studio's output window.");
jQuery("#welcomeMsg").html("blah");
}
</script>
Mein CordovaSourceDictionary.xml sieht aus wie es auch in Ordnung ist:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is auto-generated, do not edit! -jm -->
<CordovaSourceDictionary>
<FilePath Value="www\cordova-1.5.0.js"/>
<FilePath Value="www\index.html"/>
<FilePath Value="www\jquery.mobile.min.js"/>
<FilePath Value="www\master.css"/>
</CordovaSourceDictionary>
aber ich diese Fehler erhalten beim Versuch die WP7 App zu debuggen:
Thank you! Durch diese kleine Tatsache richtig durchgebrannt. –