I am trying to parse a jQuery get request into an object or some other way to get a specific div on a page.
Here is my code:
$.get("http://en.wikipedia.org/wiki/Afghanistan", function(response) {
var elements;
elements = $.html(response);
console.log(elements);
});
The only problem is that the elements are not processed HTML. Let's say I want to get a specific divresponse variable - how would I do this? This is done in order to (eventually, after some processing) copy it divto my local page.
Don't worry about cross-domain issues - this is for the Phonegap app
source
share