130
rated 0 times
[
134]
[
4]
/ answers: 1 / hits: 17252
/ 9 Years ago, mon, may 4, 2015, 12:00:00
var html = '<p>sup</p>'
I want to run document.querySelectorAll('p')
on that text without inserting it into the dom.
In jQuery you can do $(html).find('p')
If it's not possible, what's the cleanest way to to do a temporary insert making sure it doesn't interfere with anything. then only query that element. then remove it.
(I'm doing ajax requests and trying to parse the returned html)
More From » dom