Use built in bootstrap event firing and simpler jquery to correctly collapse and expand all items.