I am trying to get HTML code from a webpage that is not in the same domain. The html text is parsed & summarises a recipe(recipe name, main ingredients, no. of steps) found
What you are trying to do can't be done using any AJAX library. Browsers' cross-domain policy won't allow you to do this.
But you can do this with a combination of php (or any other server-side language) and AJAX. Create a php script like this:
Let us say the script's name is fetch.php
.
Now you can throw an AJAX call from your jQuery code to this fetch.php
and it will fetch the HTML code for you.