-
1 Aug 2012 6:32 AM #1
Answered: DomQuery Pseudo Classes
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?
Here is the error message I am receiving:HTML Code:success: function(response){ xmlResponse=response.responseXML; console.log(Ext.DomQuery.select('Resource:first',xmlResponse)); }
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
-
Best Answer Posted by mitchellsimoens
I couldn't get :first to work but I did get :first-child to work for me.
-
3 Aug 2012 5:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3157
I couldn't get :first to work but I did get :first-child to work for me.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 Aug 2012 6:23 AM #3


Reply With Quote