Hello,
I have a problem when I use the animate function with color plugin.
I try to color a text in red then in black. But sometimes, the text "blocks" in red and does not return in black.
It occurs at random (Approximately 1 / 30)
This is my code :
test_animate.js
- $(document).ready(function () {
$('#lien').click(function () {
$('#test').animate({
color: 'red'
},500, function() {
$(this).animate({
color: 'black'
},1000);
});
});
});
index.html :
- <html>
<head>
<script type="text/javascript" src="/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/js/jquery/color.js"></script>
<script type="text/javascript" src="test_animate.js"></script>
</head>
<body>
<span id="test" style="font-size: 30pt ;">Test</span><br/><br/>
<a href="#" id="lien">Click</a>
</body>
</html>