Use jquery get specific element from remote page
Posted: Wed Aug 27, 2008 7:36 pm
I've been googling all over the place, and I'm sure there is an _easy_ answer to this, but I just can't find it. I want to get the data from ONE element on a remote site, and insert it into my own div. I have this:
Code: Select all
jQuery.ajax({
url: baseUrl,
processData: true, //also tried with false, made no difference that I could see
dataType: "html",
success: function(elemented){
document.getElementById('stuff').innerHTML = jQuery("div.stuffIWant", elemented); //doesn't work, this is where I need help
},
error: function() {
alert("fail");
},
});