jQuery and Windows 8 JavaScript Metro Style Apps

前端 未结 9 1379
小蘑菇
小蘑菇 2021-02-02 11:31

Can jQuery be used in Windows 8 Metro-style apps developed using the JavaScript API? I\'m looking at the samples, and there\'s a lot of standard DOM manipulation like doc

相关标签:
9条回答
  • 2021-02-02 11:49

    The $ is not magic. jQuery is just a javascript library. It should run fine.

    The only thing that might not work are cssHooks which won't take into account any 'quirks' of their environment.

    So yes, it will work, if you trust Microsoft to produce an environment that follows the HTML/CSS/JS specifications.

    Do you feel lucky?

    0 讨论(0)
  • 2021-02-02 11:51

    JQuery should work fine but bear in mind there is some built in functionality for doing this kind of thing, in the case of your example:

    WinJS.Utilities.query("#someId li")
         .listen("click", function (result) {
    

    Query Collection Documentation

    0 讨论(0)
  • 2021-02-02 11:55

    It should run fine. jQuery is just a library. The $('#someid') will internally call the document.getElementById You can use it just as if you can use the javascript code you write yourself...

    0 讨论(0)
提交回复
热议问题