ok... now that i'm not working anymore, and i'm thinking slower, i believe it make some sense because css3 should work in same way...
and now that i know how this work, then i want always the last level and it make my code yet simpler :P $( '#div_pdfs div:last' ) will always get the empty node where i need to put a new file input... thanks everyone... i think this thread can be considered closed... ;) On Fri, Dec 12, 2008 at 8:20 PM, brian <bally.z...@gmail.com> wrote: > > On Fri, Dec 12, 2008 at 2:41 PM, Diogo Neves <dafne...@gmail.com> wrote: > > hi brian, > > > > thanks for your help! > > > > well... i only suspected that $( '#div_pdfs div:last div:last' ) worked > > because $( '#div_pdfs div:eq(1) div:eq(1)' ) worked perfectly... > > > > that HTML is generated by javascript, it has as much levels as needed... > i > > only do this like that because some browsers will reset the field input > if u > > change the same DOM level of it. > > Sorry, I wasn't criticising your markup. I'm not sure I understand > your explanation but, sometimes, ya gotta do what ya gotta do. > > > anyway, i already solved the problem, my question now is something like, > is > > it a bug or not? > > No, it's a feature. The :last selector doesn't only consider the > immediate children. It digs down all the way. > -- Thanks, Diogo Neves Web Developer @ SAPO.pt by PrimeIT.pt