开发者

Load and then wrap but wrap isn't working in jQuery

开发者 https://www.devze.com 2023-04-12 01:15 出处:网络
Below is my jQuery which loads the file from the href on click and appends it. That is all working. The wrap part is not working though.

Below is my jQuery which loads the file from the href on click and appends it. That is all working. The wrap part is not working though.

$('<div class="jobs-services-section"></div>').load($(this).prop('href')).wrap('<tr><td></td></tr>').in开发者_JAVA百科sertAfter(p);

Any ideas?


You need to insert it then wrap it.

$('<div/>').addClass('jobs-services-section').inserAfter(p).load($(this).prop('href')).wrap('<tr><td></td></tr>');
0

精彩评论

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