I have two divs that have 50% width each. I want to make it so that the the hovered div expands to 70% and the other reduces to 30%. And when the mouse moves out, they both
To take @James' answer (+1) and add animation, just use .animate():
$(function(){ $("#div1").hover( function(){ $(this).animate({width: '70%'}); }, function(){ $(this).animate({width: '50%'}); } ); });
Demo: http://jsfiddle.net/mattball/sAW2c/