louisremi / jquery.transition.js

Upgrade jQuery's .animate() method to use CSS3 Transitions in modern browsers.
435 stars 81 forks source link

fadeIn() not fading in #12

Closed ryancoke closed 12 years ago

ryancoke commented 12 years ago
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="jquery.transition.js" type="text/javascript"></script>
<script type="text/javascript">
    $("#test").click(function()
    {
        var self = $(this);
        self.fadeOut(1000, function() { self.fadeIn(1000); });
    });
</script>

When I don't include the jquery.transition.js I click the

and it will fade out then fade back in. But when I include the jquery.transition.js it will fade out but not fade in properly.

louisremi commented 12 years ago

You're right, it seems that using "hide","show" or "toggle" values causes such problems. I can only think of a workaround:

self.animate({opacity: 0}, 1000).animate({opacity: 1}, 1000);
louisremi commented 12 years ago

Ok, I think I found where the problem lies. A fix is on the way.

louisremi commented 12 years ago

This problem has been fixed in the latest version of jquery.transition.js

Thanks for your patience, Lr