Accessing DOM object after AJAX call?

后端 未结 6 1889
南方客
南方客 2020-12-29 14:57

I have a typical AJAX call that appends some HTML to the current page. I want to be able to access the newly inserted HTML with typical jQuery selectors.

Here\'s wha

6条回答
  •  Happy的楠姐
    2020-12-29 15:29

    how about:

    $.ajax({
       url: url,
       success: function(data) {
          $('body').append(data).find('#new_div').show();
       }
    });
    

提交回复
热议问题