.andSelf returns the jQuery object (well, adds it to the selection and returns the set). This would be great if there was a jQuery object to string method of some sort.
My Googling around suggests what I'm looking for is called outerHTML, which is supported by every major browser but Firefox. What a pain! On Dec 14, 3:44 pm, Dave Methvin <[EMAIL PROTECTED]> wrote: > > So if I have > > <div class="example" id="example10"> > > Lorem ipsum <strong>dolor sit amet</strong>. > > </div> > > I need to grab that entire bit as a single string, including the first > > div and it's attributes. > > How about the.andSelf() method? > > http://docs.jquery.com/Traversing/andSelf