Get selected element’s outer HTML
I believe that currently (5/1/2012), all major browsers support the outerHTML function. It seems to me that this snippet is sufficient. I personally would choose to memorize this: // Gives you the DOM element without the outside wrapper you want $(‘.classSelector’).html() // Gives you the outside wrapper as well only for the first element $(‘.classSelector’)[0].outerHTML … Read more