detect animation support and then decide to remove modal/poplist from dom immediately or wait until animation is finished