Indeed, a good example would be the best way to explain. Criterialegend> Tablediv> Fielddiv> Valuediv> div> [jQuery] Re: Appending content in order 2008-02-11 Thread Karl Swedberg Hi again. :) This should help you understand what :eq() does: http://docs.jquery.com/Selectors/eq#index "Matches a single element by its [zero-based] index." I'm sure we can achieve what you're trying to do, but it's hard for me to help without being able to at least see the HTML. As it is, [jQuery] Re: Appending content in order 2008-02-11 Thread Feijó Hi Karl, Its a bit more confunsing, I simplified too much In my div, I change a value from a that triggers a code that clone the parent (the div) If I do that a few times, every new div goes to the bottom I do not know what eq() is!! there is a function that return that? Here is a sam [jQuery] Re: Appending content in order 2008-02-11 Thread Karl Swedberg Hi Feijó, you could try this ... $('div.main > div.sub:eq(2)').after(''); That should insert your new div after the 3rd one. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2008, at 2:25 PM, Feijó wrote: consider that html: 4 matches Advanced search Search the list Site Navigation The Mail Archive home jquery-en - all messages jquery-en - about the list Expand Mail list logo
Hi again. :) This should help you understand what :eq() does: http://docs.jquery.com/Selectors/eq#index "Matches a single element by its [zero-based] index." I'm sure we can achieve what you're trying to do, but it's hard for me to help without being able to at least see the HTML. As it is,
Hi Karl, Its a bit more confunsing, I simplified too much In my div, I change a value from a that triggers a code that clone the parent (the div) If I do that a few times, every new div goes to the bottom I do not know what eq() is!! there is a function that return that? Here is a sam
Hi Feijó, you could try this ... $('div.main > div.sub:eq(2)').after(''); That should insert your new div after the 3rd one. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2008, at 2:25 PM, Feijó wrote: consider that html: