now hiding child to be shown before moving it out of view
added opacity to transition to avoid flickering of pages