ok, that is actually an very true thought but still it's an quiet
strict and weird interpretation of the words insertAfter..
This actualy means at the end that it is rather impossible to add an
item after an root element without appending it..

2007/3/29, Karl Swedberg <[EMAIL PROTECTED]>:
> this might not actually be a bug. I have a hunch that it has to do with your
> use of .insertAfter()
>
> .insertAfter() will insert the elements one at a time in the correct order,
> but since each one is being inserted immediately after the h2, each is
> appearing before the previous one.
>
> I'm probably not explaining this well, so I'll just say that you will have
> more success using .appendTo(). Depending on how your DOM is structured, you
> might want to first create a container div after the h2 and then append your
> $(html) to that.
>
>
> --Karl
> _________________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
> On Mar 29, 2007, at 9:17 AM, Michel Brouckaert wrote:
>
> this is a bug I found when using firebug to refresh some data in an menu..
> code:
> $.post(rAction,{action:"login",ddd:$("#ccc").val(),ddd:$("#ddd").val()},function(html){
>  $(html).insertAfter($("div#compte .padder fieldset
> h2")).load(errorVerif2());
>  activeMenu();
>  $.load(errorVerif2());
>  });
> instead of returning
> <p>1</p>
> <p>2</p>
> <p>3</p>
> <ul>
>  <li>1</li>
>  <li>2</li>
>  <li>3</li>
> </ul>
>
> it returned the following
>
>
> <ul>
>  <li>1</li>
>  <li>2</li>
>  <li>3</li>
> </ul>
> <p>3</p>
> <p>2</p>
> <p>1</p>
>
> the reversion of the elements only seems to happen on the top level
> elements of the html answer.
> But it seems rather disturbing.
>
> thx for reading this.
> Michel Brouckaert
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to