tags:

views:

28

answers:

1

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);

            }
    });
+1  A: 

Is the ID of the object 'lwrapper'? If so, your selector syntax is wrong. You can do:

slide = $(data).find("#lwrapper");
karim79