Skip to content

Instantly share code, notes, and snippets.

@silentrob
Created July 26, 2009 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silentrob/155940 to your computer and use it in GitHub Desktop.
Save silentrob/155940 to your computer and use it in GitHub Desktop.
// 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