Get HTML of element and children
Hi,
I'm trying to get an unordered list and its children as an HTML string on a mouseout event, but
html() only selects the child elements:
-
var theHtml = $('ul', this).html();
I've tried using
andSelf(), but that doesn't return the result I want:
-
var theHtml = $('ul', this).andSelf().html();
I can't choose $(this).html() as I need only the list.
What am I missing?