I want to test if a string has html tags in it.
html = "<p class=\"c\">some <span>conten<b class=\"i\">t</b></span><p><p>more content</p><p><i>important</i>";
I would think that using either find() or has() would help me do this, but it's not working.
$(html).find("p") //[]
$(html).has("p") //[]
And I get confusing results if I experiment.
$(html).has("p") //[]
$(html).has("*") //array of <p> elements and children
$(html).has("*") == true //false
$(html).has("*").length == true //false ??
Why can't I use any of these methods to see if my string contains HTML markup?
Thanks