Check out example codes for "get selected element html jquery". It will help you in understanding the concepts better.

Code Example 1

$('.classSelector')[0].outerHTML

Code Example 2

$('.classSelector')[0].outerHTML

Learn ReactJs, React Native from akashmittal.com