Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$.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')
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.