I do not have much experience with jQuery and I think this is very minor issue. I am trying to get html
of an element including its self. But it is returning only internal content of selected element.
For example I have implemented this on li
tag but I am able to get its internal content only with this. How I can get complete html
For example this is my html
<li class="selected_li"> <span> some text </span> </li>
and this is jQuery
jQuery(".selected_li").html();
So it is returning only span and its text but I want to get complete html which is
<li class="selected_li"> <span> some text </span> </li>
How I can get this. Is there a different jQuery function to get this?