This sounds like a bug to me. Better raise it on the jQuery Dev list: http://groups.google.com/group/jquery-dev/
- Richard On Tue, Sep 16, 2008 at 4:58 AM, tchvil <[EMAIL PROTECTED]> wrote: > > Hi, > replaceWith returns the JQuery element that was just replaced. > > In the example below: > $( 'div#old' ).replaceWith( '<div>new</div>' ).html() > > It is the html of the old div that is returned. > Is there another set of commands to get the new one returned? > > Thanks, > tchvil > > > Here is a working example: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ > TR/html4/strict.dtd <http://www.w3.org/TR/html4/strict.dtd>"> > <html> > <head> > <script type="text/javascript" src=" > http://jqueryjs.googlecode.com/ > files/jquery-1.2.6.pack.js<http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js> > "></script> > <title>ReplaceWith Chain</title> > </head> > <body> > <div id="old">old</div> > <script type="text/javascript"> > > alert($('div#old').replaceWith('<div>new</div>').html()); > </script> > </body> > </html> > >