下面的代码用于选择特定对象并将其插入到 sharepoint 2010 中员工目录项列表中的所有对象之前。
如果职位名称在列表中managerTitles
,如果此人尚未准备好,则将其设为列表中的第一个
if($.inArray(jobTitle3, managerTitles) >= 0) {
// If they're not first in the list, move them there"
if(personIndex > 0) {
// Move the manager to first
$(this).insertBefore($('.psrch-FullResult:first'));
}
// Insert a block div to create a line break after the manager
$("<div style='display:block;clear:both;'></div>").insertAfter($('.psrch-FullResult:first'));
//removed this line due to need for multiple heads of a dept -- return false;//Leave the .each iterator
}
代码
$(this).insertBefore($('.psrch-FullResult:first'));
不执行任何操作,代码也是如此
$("<div style='display:block;clear:both;'></div>").insertAfter($('.psrch-FullResult:first'));
但是当我尝试写一些东西时
$("<p>testing</p>").insertBefore($('.psrch-FullResult:first'));
it works
请提出一些解决方案。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)