collapses an item with the given class