开发者

getting a slide of 'data' returned by $.ajax

开发者 https://www.devze.com 2023-01-03 09:09 出处:网络
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).

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

精彩评论

暂无评论...
验证码 换一张
取 消