jQuery get Function Not Returning Data
- by senfo
I'm trying to use the jQuery get function to render the results of an HTML page in a div on my page. The result of the get function appears to be successful because the value of textStatus (in the following code block) is "success". The value of data, however, is always empty.
$(document).ready(function() {
$.get('http://www.google.com', function(data, textStatus){
$('#RSSContent').html(textStatus + ' ' + data);
});
});
Any idea what I might be doing wrong?
Note: The final code will query an RSS feed, which I plan on transforming and rendering as HTML in the RSSContent div. I simply used http://www.google.com for testing purposes.