Reputation: 5776
I have a basic jQuery question. I get an jquery object from a string:
var o = $(html_in_string)
Inside this jquery object, there is an element i want to have access to. How can i achieve that if i have the id of that element?
Upvotes: 1
Views: 84
Reputation: 69260
If I understand you correctly, html_in_string
is a string containing html. In that case you can use find()
.
var o = $(html_in_string).find("#some-id")
Upvotes: 2