javascript - jQuery: Object #<Document> has no method 'find' -


i trying fetch response xml backend , parse on page of jquery.
code simple:

var response = "<response><someelement><fewmoreelement></fewmoreelement><fewmoreelement></fewmoreelement><fewmoreelement></fewmoreelement></someelement></response>"; $.parsexml(response).find("someelement").each(function(searchresp){ //do         }); 

you need make jquery object :

change

$.parsexml(response).find("someelement") 

to

$($.parsexml(response)).find("someelement") 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -