Created
February 3, 2012 09:31
-
-
Save anonymous/1729309 to your computer and use it in GitHub Desktop.
jquery.transit: problem with delay:0
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script> | |
<script src='https://raw.github.com/rstacruz/jquery.transit/master/jquery.transit.js'></script> | |
<script> | |
$(document).ready(function(){ | |
$("#anim").transit({x:500, delay:0}, 1000, "in-out", function(){ | |
alert("completed first animation"); //never called | |
}); | |
//now x = 500, y = default | |
$("#anim").transit({y:500}, 1000, "in-out", function(){ | |
alert("completed second animation"); //never called | |
}); | |
//now x = 500, y = default | |
// -- should be x = 500, y = 500 | |
}); | |
</script> | |
<title>TEST</title> | |
</head> | |
<body> | |
<div id="anim" style="position:absolute; width:400px; height:300px; background:red;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment