1
$.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?

3 Answers 3

2

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');
});
Sign up to request clarification or add additional context in comments.

Comments

1

try this

$(data).find('div');

you can use this

Comments

0

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')

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.