Lib: added a callback at the start of the expansion/collapsing animation. Updated doc