I am trying to get HTML from a HTML string, I am trying to do this:
var html = '<ul><li>list 1</li><li>List</li></ul>';
console.log($(html).find('ul').html());
But, this return undefined.
What I am trying to do in above code:
actually my html string is returned by an ajax request. And I want to append this html string to a <ul>. so before appending HTML string I want to remove <ul> tags returned from ajax.
Please help me get string without <ul>