I would like to implement a jquery get request to a page that looks like that:
<tr class='tr'>
<td class='example1'>
<span> Information I have <span>
<div> Something <div>
</td>
<td class='example2'>
<span> Information I want to get <span>
<span> something else </span>
</td>
</tr>
In the page, there are multiple ‘TR’, and what I want is to reach the one with ‘Information I have’ and get ‘Information I want to get’.
I would like to use an ajax request:
setInterval(function() {
$.ajax({
type: "GET",
url: "url_of_the_page",
success: test
});
}, 5000);
function test(html) {
$(html).find("Information I have").each(function()
But I don’t know how to reach the info.
You can use the following:
Just one thing worth mentioning. The above selector is case sensitive, so elements with
informationrather thanInformationwill not be returned.Fiddle here