With $.ajax i'm getting a page dinamicly generated via PHP code, in the HTML returned I need only one object ('lwrapper' in my code).
How can I grabber my object (with id='lwrapper') from 'data' returned开发者_如何转开发.
this is my code
$.ajax({
url: ref, //the url
cache: false,
success: function(data){
//code to get the slide of data
slide = $("lwrapper",data) //NOT WORKING!!!
$('wrapper').html(slide);
}
});
Is the ID of the object 'lwrapper'? If so, your selector syntax is wrong. You can do:
slide = $(data).find("#lwrapper");
精彩评论