开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜