It will depend on your CSS.
If they move left, then all you have to do is animate the width from # 2 to 0 before deleting it.
Example: http://jsfiddle.net/a6NPP/
$(myspan).animate({width:0}, 600, function() { $(this).remove(); });
This implies the absence of a border / fill / field. If so, you will need to animate the properties to the left and right of them, or place each in the container using overflow:hidden and animate its width.
EDIT: If you want to use jQueryUI , it has many effects that you can use .
source share