Update accordion.js

I have added a method which will help us when accordion group will be collapse or show.