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

Problem on google chrome/chromium/firefox when changing between tabs. #2

Open
miguelchavez opened this issue Jul 20, 2011 · 0 comments

Comments

@miguelchavez
Copy link

I am having problems when I use this plugin in firefox, chrome/chromium, and i change to another tab and wait for a while (a minute +-)

When I come back to the tab where the animation is (automatic flipping), the animation runs faster, like if all the animations that were supposed to be running while the tab is hidden are all run when returning to the tab without the proper pause.

Is this problem of javascript and the way the browser is executing the script or what?

I noted that in the plugin homepage (http://www.zachstronaut.com/projects/rotate3di/) this DOES NOT HAPPENS. Why?

The browsers versions are:
Chromium: 12.0.742.112 (90304) Ubuntu 10.10
Chrome: 12.0.742.124
Firefox: 5.0

This is my code:

<html>
<head>

<script type="text/javascript" src="media/js/jquery.js"></script>
<script type="text/javascript" src="media/js/base.js"></script>
<script type="text/javascript" src="media/js/rotate3di.js"></script>

<style type="text/css">
#contenedor {
border: 2px solid blue;
width:410px;
padding:70px;
border-radius: 8px 8px 8px 8px;
-moz-border-radius: 8px 8px 8px 8px;
-webkit-border-radius: 8px 8px 8px 8px;
}

 .carta {
 width: 320px;
 border: 2px solid gray;
 border-radius: 8px 8px 8px 8px;
 -moz-border-radius: 8px 8px 8px 8px;
 -webkit-border-radius: 8px 8px 8px 8px;
 background-color: #282828;
 }

.carta img {margin:10px;}
</style>


<script type="text/javascript">
window.onload = function(){
 $('#animar').rotate3Di(-30, 800);
 setInterval(function() {$('#animar').rotate3Di('toggle', 2000, {sideChange: mySideChange});}, 4000);
}

function mySideChange(front) {
    if (front) {
            $(this).css('background', '#282828');
        } else {
            $(this).css('background', '#CCC');
        }
}
</script>
</head>

<body>
<div id="contenedor">

<div id="animar" class="carta">
<p>just a demo!</p>
<img src="media/demo.jpg">
</div>

</div>

</body>
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

1 participant