Search This Blog

Total Pageviews

Thursday, September 21, 2017

Expand ALL & Collapse ALL in Sharepoint Library Group View

 <input type="button" value="Expand ALL" onclick="ProcessAll(this)"  style='color:white;background-color:darkgreen;font-weight:bold;'/>

<script>
function ProcessAll(btnobj)
{
if(btnobj.value=="Expand ALL")
{
expandAllData();
btnobj.value="Collapse ALL";
}
else
{
collapseAllData();
btnobj.value="Expand ALL";
}
}
function  expandAllData() {
$("img.ms-commentexpand-icon").click();
}
function  collapseAllData() {
$("img.ms-commentcollapse-icon").click();
}
</script>

No comments:

Post a Comment