Results 1 to 3 of 3

Thread: DomQuery Pseudo Classes

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    23
    Vote Rating
    1
      0  

    Default Answered: DomQuery Pseudo Classes

    The documentation for Sencha Touch 2 at
    http://docs.sencha.com/touch/2-0/#!/api/Ext.DomQuery

    lists several pseudo classes that can be searched for using DomQuery.
    I can't seem to get E:first to work. Ultimately, I want to loop through the records in the result set I get from the success function.

    If I can get E:first to work, I should be able to get E:last to work, and use E:nth(n) to loop.

    What am I doing wrong?

    HTML Code:
    success: function(response){
         xmlResponse=response.responseXML;
         console.log(Ext.DomQuery.select('Resource:first',xmlResponse));
    }
    Here is the error message I am receiving:
    Uncaught Error: SYNTAX_ERR: DOM Exception 12

    Also, if I leave off :first, it returns the entire result set.
    Last edited by danrosshoward; 1 Aug 2012 at 6:44 AM. Reason: included error code

  2. I couldn't get :first to work but I did get :first-child to work for me.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    I couldn't get :first to work but I did get :first-child to work for me.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    23
    Vote Rating
    1
      0  

    Default

    me too. thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •