Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7399 closed bug (invalid)

Animate Padding to Zero

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:


The '.animate()' for padding always starts from zero pixel padding. A full description can be found here:


Change History (3)

comment:1 Changed 12 years ago by jitter

This bug doesn't happen for IE and Opera. But it shows in FF and Chrome.

This isn't an animate() bug but has to do with css().

test case

(Recently saw this) similar/related report #5526. Sometimes there seem to be problems with short-hand properties.

Instead of the workaround on stackoverflow you could also include the marginpadding.js from Brandon Aarons jQuery-cssHooks. This also fixes the problem

Your test case with jQuery-cssHooks

comment:2 Changed 12 years ago by snover

Resolution: invalid
Status: newclosed

I have updated the .animate documentation to match the .css documentation which states that shorthand properties are not supported.

comment:3 Changed 12 years ago by jitter

@snover Thanks for updating the documentation. But the copy-paste from the css() looks rather unfortunate. Maybe you should replace

For example, if you want to retrieve the rendered margin, use: $(elem).css('marginTop') and $(elem).css('marginRight'), and so on.


For example, if you want to animate the margin property, use

    'margin-top' : 10,
    'margin-right' : 10,
    'margin-bottom' : 10,
    'margin-left' : 10
}, 1000);
Note: See TracTickets for help on using tickets.