You can use easing to achieve this by performing a complex move:
function curve () { $('#cat').delay(10000).animate({top: "+=20px", left: "+=20px"}, { duration: 500, specialEasing: {top: 'easeOutQuad', left: 'easeInQuad'}, complete: function () { $('#cat').animate({top: "-=20px", left: "+=20px"}, { duration: 500, specialEasing: {top: 'easeInQuad', left: 'easeOutQuad'}, complete: function() {
It works with jQuery 1.4, in accordance with jQuery docs , and the mentioned softenings require jQuery UI (but only the Effect Core Module ). Each .animate() call takes into account a quarter of the full circle path, and the reverse easeInQuad vs. easeOutQuad makes the path look like a circular path, not directly to a new position.
source share