Created
July 26, 2009 22:28
-
-
Save silentrob/155940 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using XUI FX - Tween | |
x$('#add').click(function(){ | |
// This fails, blue fires before red is finished | |
x$('#baz').tween({ background:'red' }).tween({ background:'blue'}); | |
// This also doesn't work as expected. | |
x$('#baz').tween([{ background:'red' },{ background:'blue'}]); | |
}); | |
x$('#add2').click(function(){ | |
// This works like a charm :) | |
x$('#baz').tween({ background:'black',color:'#fff',after: function(){ | |
x$('#baz').tween({ background:'red',duration:1,after:function(){ | |
x$('#baz').tween({ background:'blue',duration:.5}); | |
}}); | |
}}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment