We have a document library with a view using a grouped by.
We would like to make it possible to collapse all expanded records with one click.
Does anyone have an idea if this is possible and how we can achieve this.
Regards,
Erwin
Paul Grenier, Lead Moderator
We have a document library with a view using a grouped by.
We would like to make it possible to collapse all expanded records with one click.
Does anyone have an idea if this is possible and how we can achieve this.
Regards,
Erwin
I fix everything with jQuery these days because, well, I can :)
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function closeGroups() {
$("img[src='/_layouts/images/minus.gif']").parent().click();
}
</script>
<a href="#" onClick="this.href='javascript:closeGroups()'">Close All Groups</a>
Thanks, works like a charm.
Regards,
Erwin
You must log in to post.