Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
$.get(url, function(data){}
This jQuery function returns a string with the code of the page 'url'.
How can I use the jQuery selectors on it to extract the tags informations that I need?
If it's valid HTML, you can just wrap it in jQuery and use it as you normally would :
$.get(url, function(data){ $(data).find('div'); });
Add a comment
try this
$(data).find('div');
you can use this
wrap your data with div (for including the outer most element also to extract the tags) and than use find
$("<div>" + data + "</div>").find('div')
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.