adding transtion using event listener click js code example
Example: transition event listener does not work
try 'webkitTransitionEnd' instead of 'transitioned'
element.addEventListener( 'webkitTransitionEnd',(e)=> {
console.log( "Finished transition!" );
} );