如何在默认情况下仅折叠任务列表中的某些任务 [英] How collapse as default only certain tasks in the task list

查看:133
本文介绍了如何在默认情况下仅折叠任务列表中的某些任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我知道如何在默认情况下折叠任务列表中的所有任务,但它仅适用于第1级,因此所有第1级任务都将折叠。有没有办法按默认或更好的方式折叠第二级任务,只有某些任务?谢谢。

Hello, I know how to collapse all tasks in the task list per default, but it works only on the 1st level, so all 1st level tasks will be collapsed. Is there a way to collapse the 2nd level tasks per default or better, only certain tasks? Thank you.

推荐答案

您好Karych,

Hi Karych,

您可以将以下代码添加到内容编辑器Web部件或脚本中任务列表页面中的编辑器Web部件。它将崩溃第二级任务。

You could add the code below into content editor web part or script editor web part in the task list page. It will collapse the second level tasks.

<script src="https://code.jquery.com/jquery-1.10.2.js"></script>

<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<script type="text/javascript">

function doCollapseTaskList() {


(&.; ms-commentcollapse-iconouter> img")。each(function(){
(".ms-commentcollapse-iconouter > img").each(function(){


(this).click();

});

}
(this).click(); }); }


这篇关于如何在默认情况下仅折叠任务列表中的某些任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆