I have the following HTML:
Hover:
-
When I do this and I want that same +border -movement result, I like to do this:
function() {
$(this).css('borderWidth', '7px');
$(this).css('margin', '-7px');
});
The negative margin brings everything back in.
You can also condense the styles into an object and pass them in one .css() call:
$(this).css( {borderWidth: '7px', margin: '-7px'} );