$.get parsing html response
I have a piece of code:
-
$.get('NewRecord.aspx',{id:'1',name:'Mike',age:'20'},function(data,textStatus){alert(data);alert(textStatus);});
The $.get() returns html in the javascript variable "data". In the "data" variable, there is a <span> tag with the id="Results". How would I just return the html in #Results?
I've tried the following (and some variations) but I keep on getting javascript errors.
-
function(data,textStatus)
{
alert(data.$('#Results').html());
}
What is the correct way to do this? Thank you!