Reconstruction of ElementTransitions.js code, thanks to pageTransitions.js and ElementTransitions.js.