Detect animation using timing function instead of duration