I using ajax to retrieve a web page like that:
$.ajax({
url: "/Cadastros/pagina_busca_correios?cep=" + cep,
type: "Get",
DataType: 'Html',
success: function (data) {
var webdata = data;
var tables = $(webdata).filter('table');
alert(tables);
}
});
I am able to print the html in data return but after creating the jquery object and apply filter I get noting. It is like a have an error with my javascript.
PS. I know I have 4 tables inside this html string, so I would like to filter the tables and iterate through them to perform actions. Those elements inside the DOM has no id´s or names that I could use to select straight forward.
What I am doing wrong?
tableelements in the root of webdata?findinstead offilterbut I have no way to know.