$('#nav span').css({ width: $('#nav .current').outerWidth(), left: $('#nav .current').position().left }); $('#nav a').mouseover(function(){ $('#nav span').stop().animate({ width: $(this).outerWidth(), left: $(this).position().left}, "fast"); });