[jQuery] How to get all CSS values from Attributes

[jQuery] How to get all CSS values from Attributes


Suppose this piece of css, how would I get the values for top, margin-
left or padding?
#divname {
top: 0;
margin-left: 1px;
padding: 7px;
}
Setting this is easy:
$(#divname).css('height', '200px');
And getting it also:
var foo = $(#divname).width();
or
var foo = $('#divname').get(0).width;
However top, margin etc. I don't how to fetch it. Probably very
obvious problem but seem to overlook it.
Thanks in advance!
---
Jeroen