1 Reply Latest reply on Jul 15, 2017 12:14 PM by kerrishotts

    Trouble with Jquery and Cordova

    phonefusionryan Level 1

      Hello I'm new to Cordova,

       

      I'm trying to simply just add Jquery to my project, but it seems as soon as I write 1 line of Jquery, everything no longer works.

       

      I literally just create a new blank cordova project with the Cordvoa CLI, add the ios platform, prepare for ios, open the xcode project, run the simulator and I see the nice "Device is Ready" flashing green, Great!.

       

      I next run add the "cordova-plugin-console" plugin, so that I can see in the simulator calls to "console.log"... and in fact when I run the simulator again, I now see the output "Event: deviceready" from the "receivedEvent" function. We're all good!

       

      Now I add a local copy of "jquery.min.js" to the "js" folder, add the link to include jquery into the index.html's header, add the normal $(document).ready code inside of the index.js, prepare for ios, run the simulator, and I see forever "connecting to device" and no more flashing green, and no more outputs from console.log, we're not good.

       

      Am I missing something? This works just fine with Phonegap and Phonegap Build.