本文介绍了jquery在apache cordova visual studio 2015社区中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了blanc apache cordova app。有简单的jquery不起作用。但有趣的是,一个月前相同的代码工作。 vs2015社区有限制吗?或者我错过了什么?

index.html:

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:

<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:


index.js:

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");
        });

    };

推荐答案



这篇关于jquery在apache cordova visual studio 2015社区中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 01:44