JQuery
Assume this works: $('table td').load('/my/url/ div p');
I would end up with <td><p>Some Text</p></td>
I want to end up with <td>Some Text</td>
How would I do that?
JQuery
Assume this works: $('table td').load('/my/url/ div p');
I would end up with <td><p>Some Text</p></td>
I want to end up with <td>Some Text</td>
How would I do that?
You probably need to use a callback function. Something like:
$('table td').load('/my/url/ div p', function () {
$(this).find("p").replaceWith($(this).text());
});
var el = $('table td').load('/my/url/ div p', function() {
var $this = $(this);
$this.html($this.find('p').html());
});