Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some suggestion feedback to you #5

Closed
bau720123 opened this issue Jul 5, 2014 · 5 comments
Closed

some suggestion feedback to you #5

bau720123 opened this issue Jul 5, 2014 · 5 comments

Comments

@bau720123
Copy link

hi @leecrossley
the "flip" and "curl" work great (Animation is great)
but the "fade" seem no affect (no Animation,but have trigger the "onComplete" method)

@bau720123
Copy link
Author

hi @leecrossley
is there anything feedback or ?

@leecrossley
Copy link
Owner

If you can't see the fade, try extending the duration:

var duration = 1; // animation time in seconds
nativetransitions.fade(duration);

@bau720123
Copy link
Author

hi @leecrossley
no mater duration is 0.5 or 1,it really no affect in "fade" mode
I tried many many times,trust me

@leecrossley
Copy link
Owner

I will need to see your app code, as this will be an implementation issue and not a problem with the plugin (I have checked this feature this morning).

Ensure you have followed these guidelines:

setTimeout(function() {
    // Change your html here
}, 50);
nativetransitions.fade(1);

@bau720123
Copy link
Author

hi @leecrossley
I finally know why "fade not work"
these are all my code

<script type="text/javascript">
function checkNativeTransitions(action,action2,action3)
{
 if(action == 'flip')
 {
 var duration = action2;
 var direction = action3;
 nativetransitions.flip(duration, direction, onComplete);
 }
 if(action == 'curl')
 {
 var duration = action2;
 var direction = action3;
 nativetransitions.curl(duration, direction, onComplete);
 }
 if(action == 'fade')
 {
 var duration = action2;
 nativetransitions.fade(duration, onComplete);
 }
}

function onComplete()
{
alert("success");
}
</script>

<a onCack="checkNativeTransitions('flip',0.5,'left');">fade_left</a>
<a onCack="checkNativeTransitions('flip',0.5,'right');">fade_right</a>
<a onCack="checkNativeTransitions('curl',0.5,'up');">curl_up</a>
<a onCack="checkNativeTransitions('curl',0.5,'down');">curl_up</a>
<a onCack="checkNativeTransitions('fade',1);">fade</a>

suppose I am in index.html
the "flip" and "curl" can use immediately without any "page changing method" (have animation affect indeed)
but the "fade" must be use "page changing method",just like your example,otherwise,it will no animation affect (but trigger "success" indeed)

setTimeout(function() {
    // Change your html here
}, 50);
nativetransitions.fade(1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants