简体   繁体   中英

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>').insertAfter(p);

Any ideas?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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