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/

Reply via email to