简体   繁体   English

加载然后包装,但是包装在jQuery中不起作用

[英]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. 下面是我的jQuery,它在单击时从href加载文件并追加文件。 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>').insertAfter(p);

Any ideas? 有任何想法吗?

您需要将其插入然后包裹起来。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM