Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I created blanc apache cordova app. There simple jquery doesn't work. But interesting thing is the same code worked about a month ago. There is limit for vs2015 community? Or I'm missing something?
index.html:
HTML
<body>
    <p>Hello, your application is ready!</p>
    Ready
    Second
    <input type="button" id="btnTest" value="Click" />
    <p id="demo"></p>
    
    <!-- Cordova reference, this is added to your app when it's built. -->
    <script src="cordova.js"></script>
    <script src="scripts/platformOverrides.js"></script>    
    <script src="scripts/index.js"></script>
    <script src="scripts/jquery-2.1.4.min.js"></script>
</body>

index.js:
C#
function onDeviceReady() {
        // Handle the Cordova pause and resume events
        document.addEventListener( 'pause', onPause.bind( this ), false );
        document.addEventListener( 'resume', onResume.bind( this ), false );
        
        // TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.
        $("#btnTest").click(function () {
            $("#demo").text("Hello World");
        });
      
    };
Posted
Comments
hypermellow 23-Dec-15 6:18am    
Hi, have a look at the order that you are including your js files.

I would have expected jQuery to be included 1st ... then include the rest of the js files.
Yoqubjon Kholmatov 23-Dec-15 10:17am    
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900