(Apologies of this double-posts somehow; lots of trouble with Google Groups earlier, haven't seen the message come up yet, so:)
For an Ajax application I'm working on, I need to POST the HTML contents of an element including the element itself. 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. The only way I can figure to do this is to .wrap() the entire element in another div, then get the .html() of that wrapper, then remove the wrapper. This feels clumsy and inefficient for a pretty straightforward task, and messes with the DOM a bit more than I'd like (the changes can theoretically mess with the page layout on the viewer's end). Is there a better way to do this?