locked
jquery style selectors in WinJS

    Question

  • Is there a way to get elements by using CSS selectors like in jquery with a single call?

     

    I would like to do something like: find('input[name=lastName]') and the the list of elements that match the selector.

    Thursday, September 15, 2011 2:28 PM

Answers

  • Should have looked a bit longer on my own. Turns out it is WinJS.Utilities.query
    • Marked as answer by Ghostrider-13 Thursday, September 15, 2011 2:36 PM
    Thursday, September 15, 2011 2:36 PM

All replies

  • Should have looked a bit longer on my own. Turns out it is WinJS.Utilities.query
    • Marked as answer by Ghostrider-13 Thursday, September 15, 2011 2:36 PM
    Thursday, September 15, 2011 2:36 PM
  • You can also use jQuery in your Metro style app if you wish. It can be used with zero changes in a Metro style app.
    Program Manager, Windows Runtime jason.olson@microsoft.com http://www.twitter.com/jolson88

    Thursday, September 15, 2011 4:29 PM
  • In addition to using jQuery or WinJS you can use the bultin element.querySelectorAll() http://msdn.microsoft.com/en-us/library/cc304115(v=vs.85).aspx,
    • Proposed as answer by paulgus Thursday, September 15, 2011 9:59 PM
    Thursday, September 15, 2011 8:30 PM