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>');
精彩评论